]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_refs.c
hevc: eliminate an unneeded intermediate variable
[ffmpeg] / libavcodec / h264_refs.c
index 277bc09bca382960ad9e24dd48b2a0782846db1a..03c1b9c6c39c1f99ecdcfaf221691e0b54ce6937 100644 (file)
  * @author Michael Niedermayer <michaelni@gmx.at>
  */
 
+#include <inttypes.h>
+
 #include "internal.h"
 #include "avcodec.h"
 #include "h264.h"
 #include "golomb.h"
+#include "mpegutils.h"
 
 #include <assert.h>
 
@@ -496,7 +499,7 @@ static void print_short_term(H264Context *h)
         av_log(h->avctx, AV_LOG_DEBUG, "short term list:\n");
         for (i = 0; i < h->short_ref_count; i++) {
             H264Picture *pic = h->short_ref[i];
-            av_log(h->avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n",
+            av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n",
                    i, pic->frame_num, pic->poc, pic->f.data[0]);
         }
     }
@@ -513,7 +516,7 @@ static void print_long_term(H264Context *h)
         for (i = 0; i < 16; i++) {
             H264Picture *pic = h->long_ref[i];
             if (pic) {
-                av_log(h->avctx, AV_LOG_DEBUG, "%d fn:%d poc:%d %p\n",
+                av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n",
                        i, pic->frame_num, pic->poc, pic->f.data[0]);
             }
         }
@@ -756,7 +759,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
                             (h->max_pic_num - 1);
 #if 0
                     if (mmco[i].short_pic_num >= h->short_ref_count ||
-                        h->short_ref[ mmco[i].short_pic_num ] == NULL){
+                        !h->short_ref[mmco[i].short_pic_num]) {
                         av_log(s->avctx, AV_LOG_ERROR,
                                "illegal short ref in memory management control "
                                "operation %d\n", mmco);