[FFmpeg-devel] [PATCH 3/3] lavf/utils: avoid giving up probing early with long subtitle events

Michael Niedermayer michaelni at gmx.at
Thu Oct 1 04:09:13 CEST 2015


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
-------------- 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/20151001/b83fb8ed/attachment.sig>


More information about the ffmpeg-devel mailing list