[FFmpeg-devel] [PATCH 3/3] lavf/utils: avoid giving up probing early with long subtitle events
Rodger Combs
rodger.combs at gmail.com
Thu Oct 1 04:29:57 CEST 2015
This happens on files with many overlapping subtitle events before the first packet of another stream. The combined durations of the subtitle events can exceed the max_analyze_duration before reading any of the other streams (even if they also start at the same timestamp).
I also considered simply skipping this check for subtitle streams; sound better?
> On Sep 30, 2015, at 21:09, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> On Sun, Sep 20, 2015 at 12:29:33PM -0500, Rodger Combs wrote:
>> ---
>> libavformat/utils.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavformat/utils.c b/libavformat/utils.c
>> index 199e80b..0256894 100644
>> --- a/libavformat/utils.c
>> +++ b/libavformat/utils.c
>> @@ -3343,7 +3343,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
>> break;
>> }
>> if (pkt->duration) {
>> - st->info->codec_info_duration += pkt->duration;
>> + if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
>> + if (pkt->pts != AV_NOPTS_VALUE)
>> + st->info->codec_info_duration = pkt->pts - st->start_time;
>
> this is wrong when theres a timestamp discontinuity
>
> can you explain how to reproduce the problem this fixes ?
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The bravest are surely those who have the clearest vision
> of what is before them, glory and danger alike, and yet
> notwithstanding go out to meet it. -- Thucydides
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org <mailto:ffmpeg-devel at ffmpeg.org>
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel <http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>
More information about the ffmpeg-devel
mailing list