diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-22 18:49:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-22 18:49:52 +0200 |
commit | e356f6c55d46bf3e58005c4e55b2226834a2c22a (patch) | |
tree | 04cd1451153b1dc9904e4346f196cc319fff3586 /libavcodec/rv34.c | |
parent | de9e0386b2f01852e305faae62736f387cf5a18a (diff) | |
parent | dc4b2e7d33903a6b9380e8a84b22b3a20facbb08 (diff) | |
download | ffmpeg-e356f6c55d46bf3e58005c4e55b2226834a2c22a.tar.gz |
Merge commit 'dc4b2e7d33903a6b9380e8a84b22b3a20facbb08'
* commit 'dc4b2e7d33903a6b9380e8a84b22b3a20facbb08':
rv34: use ff_mpeg_update_thread_context only when decoder is fully initialized
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index cbefc3a304..c8aa6b6738 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1569,16 +1569,18 @@ int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecConte return err; } - if ((err = ff_mpeg_update_thread_context(dst, src))) - return err; - r->cur_pts = r1->cur_pts; r->last_pts = r1->last_pts; r->next_pts = r1->next_pts; memset(&r->si, 0, sizeof(r->si)); - return 0; + // Do no call ff_mpeg_update_thread_context on a partially initialized + // decoder context. + if (!s1->linesize) + return 0; + + return ff_mpeg_update_thread_context(dst, src); } static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n) |