diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-03 18:52:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-05 15:22:59 +0200 |
commit | f90c9c306f4e8334f29972b6c90201929ccce546 (patch) | |
tree | ecd0f1c469ca70abe62a434e33b1b682885c67c4 | |
parent | 39c0b22df42088cf4fb1ceb2447291c224a5c7ed (diff) | |
download | ffmpeg-streaming-f90c9c306f4e8334f29972b6c90201929ccce546.zip ffmpeg-streaming-f90c9c306f4e8334f29972b6c90201929ccce546.tar.gz |
Check av_dup_packet() return code
Fixes: CID1338320
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/frame_thread_encoder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 04c9a0e..27ae356 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -89,7 +89,9 @@ static void * attribute_align_arg worker(void *v){ pthread_mutex_unlock(&c->buffer_mutex); av_frame_free(&frame); if(got_packet) { - av_dup_packet(pkt); + int ret2 = av_dup_packet(pkt); + if (ret >= 0 && ret2 < 0) + ret = ret2; } else { pkt->data = NULL; pkt->size = 0; |