[FFmpeg-cvslog] mpeg12: use av_mpegtc_to_timecode_string().

Clément Bœsch git at videolan.org
Thu Feb 2 14:41:10 CET 2012


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Mon Jan 16 11:30:05 2012 +0100| [ed67dac093cafa558d5e28655b76fe62d291c5ff] | committer: Clément Bœsch

mpeg12: use av_mpegtc_to_timecode_string().

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed67dac093cafa558d5e28655b76fe62d291c5ff
---

 libavcodec/mpeg12.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 71c9a58..1dae17f 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -33,6 +33,7 @@
 #include "dsputil.h"
 #include "mpegvideo.h"
 #include "libavutil/avassert.h"
+#include "libavutil/timecode.h"
 
 #include "mpeg12.h"
 #include "mpeg12data.h"
@@ -2165,15 +2166,11 @@ static void mpeg_decode_gop(AVCodecContext *avctx,
     broken_link = get_bits1(&s->gb);
 
     if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
-        int time_code_hours    = tc>>19 & 0x1f;
-        int time_code_minutes  = tc>>13 & 0x3f;
-        int time_code_seconds  = tc>>6  & 0x3f;
-        int drop_frame_flag    = tc     & 1<<24;
-        int time_code_pictures = tc     & 0x3f;
-        av_log(s->avctx, AV_LOG_DEBUG, "GOP (%02d:%02d:%02d%c%02d) closed_gop=%d broken_link=%d\n",
-               time_code_hours, time_code_minutes, time_code_seconds,
-               drop_frame_flag ? ';' : ':',
-               time_code_pictures, s->closed_gop, broken_link);
+        char tcbuf[AV_TIMECODE_STR_SIZE];
+        av_timecode_make_mpeg_tc_string(tcbuf, tc);
+        av_log(s->avctx, AV_LOG_DEBUG,
+               "GOP (%s) closed_gop=%d broken_link=%d\n",
+               tcbuf, s->closed_gop, broken_link);
     }
 }
 /**



More information about the ffmpeg-cvslog mailing list