[FFmpeg-devel] [PATCH] ffmpeg: add debug_ts trace to show what is fed up to the muxer
Clément Bœsch
ubitux at gmail.com
Thu Sep 6 15:24:00 CEST 2012
On Thu, Sep 06, 2012 at 03:11:12PM +0200, Stefano Sabatini wrote:
> This is useful, as ffmpeg the application may tweak PTS/DTS values.
> ---
> ffmpeg.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 2763db6..65daaee 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -566,6 +566,15 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
> }
>
> pkt->stream_index = ost->index;
> +
> + if (debug_ts) {
> + av_log(NULL, AV_LOG_INFO, "muxer <- stream:%d#%d type:%s "
Don't we use "->" for the "encoder" (as well as "decoder" and "demuxer")?
> + "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n",
> + ost->file_index, pkt->stream_index, av_get_media_type_string(ost->st->codec->codec_type),
> + av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base),
> + av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base));
> + }
> +
> ret = av_interleaved_write_frame(s, pkt);
> if (ret < 0) {
> print_error("av_interleaved_write_frame()", ret);
LGTM otherwise
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120906/c2fafce8/attachment.asc>
More information about the ffmpeg-devel
mailing list