[FFmpeg-devel] [PATCH] lavf/utils: avoid giving up probing early with long subtitle events
Michael Niedermayer
michaelni at gmx.at
Sat Oct 3 12:19:59 CEST 2015
On Fri, Oct 02, 2015 at 10:39:24PM -0500, Rodger Combs wrote:
> ---
> libavformat/utils.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index dc83608..be1472b 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3347,7 +3347,10 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
> break;
> }
> if (pkt->duration) {
> - st->info->codec_info_duration += pkt->duration;
> + if (pkt->pts != AV_NOPTS_VALUE && pkt->pts >= st->start_time)
> + st->info->codec_info_duration = FFMIN(pkt->pts - st->start_time, st->info->codec_info_duration + pkt->duration);
> + else
> + st->info->codec_info_duration += pkt->duration;
> st->info->codec_info_duration_fields += st->parser && st->need_parsing && st->codec->ticks_per_frame ==2 ? st->parser->repeat_pict + 1 : 2;
applied with a type == subtitle check as it would break fate
otherwise
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151003/f9a103ba/attachment.sig>
More information about the ffmpeg-devel
mailing list