Browse code

Check av_dup_packet() return code

Fixes: CID1338320

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>

Michael Niedermayer authored on 2016/02/04 02:52:26
Showing 1 changed files
... ...
@@ -89,7 +89,9 @@ static void * attribute_align_arg worker(void *v){
89 89
         pthread_mutex_unlock(&c->buffer_mutex);
90 90
         av_frame_free(&frame);
91 91
         if(got_packet) {
92
-            av_dup_packet(pkt);
92
+            int ret2 = av_dup_packet(pkt);
93
+            if (ret >= 0 && ret2 < 0)
94
+                ret = ret2;
93 95
         } else {
94 96
             pkt->data = NULL;
95 97
             pkt->size = 0;