ffmpeg: fix timestamp tracing

Use ffmpeg functions to format the timestamps.

Change-Id: Idd51feb22fc6c5a70e177604eb995ae2d8601cd4
Reviewed-on: https://review.haiku-os.org/663
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Adrien Destugues
2018-11-04 17:03:13 +00:00
committed by waddlesplash
parent 8850049390
commit 9e2c056c27
2 changed files with 7 additions and 5 deletions
@@ -1589,11 +1589,12 @@ AVCodecDecoder::_UpdateMediaHeaderForVideoFrame()
fHeader.u.raw_video.pixel_width_aspect,
fHeader.u.raw_video.pixel_height_aspect);
TRACE("[v] start_time=%02d:%02d.%02d field_sequence=%lu\n",
int((fHeader.start_time / 60000000) % 60),
int((fHeader.start_time / 1000000) % 60),
int((fHeader.start_time / 10000) % 100),
fHeader.u.raw_video.field_sequence);
char timestamp[AV_TS_MAX_STRING_SIZE];
av_ts_make_time_string(timestamp,
fRawDecodedPicture->best_effort_timestamp, &fCodecContext->time_base);
TRACE("[v] start_time=%s field_sequence=%lu\n",
timestamp, fHeader.u.raw_video.field_sequence);
}
@@ -25,6 +25,7 @@ extern "C" {
#include "imgutils.h"
#include "swresample.h"
#include "swscale.h"
#include "timestamp.h"
}