Ticket #2338: h264_parser_debug.patch

File h264_parser_debug.patch, 1.2 KB (added by rmk, 4 years ago)
  • libavcodec/h264_parser.c

    From a1f18f631c6c91ece4292e9574fc8b4f5f93bb88 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Robert=20Kr=C3=BCger?= <krueger@lesspain.de>
    Date: Fri, 8 Mar 2013 10:23:18 +0100
    Subject: [PATCH] add debug output in h264 parser
    
    ---
     libavcodec/h264_parser.c |    2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
    index 44b92b7..e817c63 100644
    a b  
    3030#include "parser.h" 
    3131#include "h264data.h" 
    3232#include "golomb.h" 
     33#include <libavutil/timestamp.h> 
    3334 
    3435 
    3536static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size) 
    static inline int parse_nal_units(AVCodecParserContext *s, 
    216217                /* key frame, since recovery_frame_cnt is set */ 
    217218                s->key_frame = 1; 
    218219            } 
     220            av_log(h->avctx, AV_LOG_DEBUG, "parsing slice at pts %s, dts %s, convergence_duration %s, key_frame %d\n", av_ts2str(s->pts), av_ts2str(s->dts), av_ts2str(s->convergence_duration), s->key_frame); 
    219221            pps_id= get_ue_golomb(&h->gb); 
    220222            if(pps_id>=MAX_PPS_COUNT) { 
    221223                av_log(h->avctx, AV_LOG_ERROR, "pps_id out of range\n");