]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/h264_refs: Do not set reference to things which dont exist
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 4 Apr 2015 16:08:23 +0000 (18:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 4 Apr 2015 16:25:44 +0000 (18:25 +0200)
Fixes deadlock
Fixes Ticket4428
Fixes Ticket4429

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_refs.c

index 35198700462b3ba6c4dd2040801ce8941f65b3ef..99cc86b4f7e7eef0c021d15580b20c7f85ba56a4 100644 (file)
@@ -717,7 +717,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
          */
         if (h->short_ref_count && h->short_ref[0] == h->cur_pic_ptr) {
             /* Just mark the second field valid */
-            h->cur_pic_ptr->reference = PICT_FRAME;
+            h->cur_pic_ptr->reference |= h->picture_structure;
         } else if (h->cur_pic_ptr->long_ref) {
             av_log(h->avctx, AV_LOG_ERROR, "illegal short term reference "
                                            "assignment for second field "