aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-19 14:55:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-19 15:44:59 +0100
commit642a655f7d9a6afc97fff5f3ecd6a7ad5d53e0ca (patch)
treeb09ea65812ccdada345d88802afa71016e1b357e /libavcodec/mpegvideo_enc.c
parente84194f06024892fc33684c5a1726c97a0c0a45c (diff)
parentf1d8763a02b5fce9a7d9789e049d74a45b15e1e8 (diff)
downloadandroid_external_ffmpeg-642a655f7d9a6afc97fff5f3ecd6a7ad5d53e0ca.tar.gz
android_external_ffmpeg-642a655f7d9a6afc97fff5f3ecd6a7ad5d53e0ca.tar.bz2
android_external_ffmpeg-642a655f7d9a6afc97fff5f3ecd6a7ad5d53e0ca.zip
Merge commit 'f1d8763a02b5fce9a7d9789e049d74a45b15e1e8'
* commit 'f1d8763a02b5fce9a7d9789e049d74a45b15e1e8': mpegvideo: allocate scratch buffers after linesize is known Conflicts: libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index aff12c6f8e..45e8c77d8a 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -3228,7 +3228,7 @@ static void set_frame_distances(MpegEncContext * s){
static int encode_picture(MpegEncContext *s, int picture_number)
{
- int i;
+ int i, ret;
int bits;
int context_count = s->slice_context_count;
@@ -3278,7 +3278,9 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s->mb_intra=0; //for the rate distortion & bit compare functions
for(i=1; i<context_count; i++){
- ff_update_duplicate_context(s->thread_context[i], s);
+ ret = ff_update_duplicate_context(s->thread_context[i], s);
+ if (ret < 0)
+ return ret;
}
if(ff_init_me(s)<0)