Commit dc386a5e authored by Clément Bœsch's avatar Clément Bœsch Committed by Clément Bœsch

ffprobe: use av_mpegtc_to_timecode_string().

parent 0eaa123b
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
#include "libavutil/dict.h" #include "libavutil/dict.h"
#include "libavutil/timecode.h"
#include "libavdevice/avdevice.h" #include "libavdevice/avdevice.h"
#include "libswscale/swscale.h" #include "libswscale/swscale.h"
#include "libswresample/swresample.h" #include "libswresample/swresample.h"
...@@ -1453,13 +1454,9 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i ...@@ -1453,13 +1454,9 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
else print_str_opt("pix_fmt", "unknown"); else print_str_opt("pix_fmt", "unknown");
print_int("level", dec_ctx->level); print_int("level", dec_ctx->level);
if (dec_ctx->timecode_frame_start >= 0) { if (dec_ctx->timecode_frame_start >= 0) {
uint32_t tc = dec_ctx->timecode_frame_start; char tcbuf[AV_TIMECODE_STR_SIZE];
print_fmt("timecode", "%02d:%02d:%02d%c%02d", av_timecode_make_mpeg_tc_string(tcbuf, dec_ctx->timecode_frame_start);
tc>>19 & 0x1f, // hours print_str("timecode", tcbuf);
tc>>13 & 0x3f, // minutes
tc>>6 & 0x3f, // seconds
tc & 1<<24 ? ';' : ':', // drop
tc & 0x3f); // frames
} else { } else {
print_str_opt("timecode", "N/A"); print_str_opt("timecode", "N/A");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment