aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2011-11-16 17:42:48 +0100
committerClément Bœsch <ubitux@gmail.com>2011-11-28 14:06:02 +0100
commitfbe6e29646582fb97317ff3e7214a04ae74c9bef (patch)
tree07414160838750aabb69aee8c96d2d1c18fca8bb
parentb1ca5634fdeac3bba8edee8a89e9246e9cb5188f (diff)
downloadffmpeg-fbe6e29646582fb97317ff3e7214a04ae74c9bef.tar.gz
ffprobe: print codec timecode if available.
-rw-r--r--ffprobe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index f58b77c296..6af76953aa 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -993,6 +993,17 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
if (s) print_str ("pix_fmt", s);
else print_str_opt("pix_fmt", "unknown");
print_int("level", dec_ctx->level);
+ if (dec_ctx->timecode_frame_start >= 0) {
+ uint32_t tc = dec_ctx->timecode_frame_start;
+ print_fmt("timecode", "%02d:%02d:%02d%c%02d",
+ tc>>19 & 0x1f, // hours
+ tc>>13 & 0x3f, // minutes
+ tc>>6 & 0x3f, // seconds
+ tc & 1<<24 ? ';' : ':', // drop
+ tc & 0x3f); // frames
+ } else {
+ print_str_opt("timecode", "N/A");
+ }
break;
case AVMEDIA_TYPE_AUDIO: