[FFmpeg-devel] [PATCH] avformat/rawdec: set AVFMT_NOTIMESTAMPS on more demuxers

Michael Niedermayer michaelni at gmx.at
Sat Apr 18 03:39:25 CEST 2015


On Fri, Apr 17, 2015 at 11:24:41PM +0200, wm4 wrote:
> On Fri, 17 Apr 2015 22:52:07 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Fri, Apr 17, 2015 at 09:59:36PM +0200, wm4 wrote:
> > > This affects a bunch of demuxers, including raw h264.
> > > ---
> > >  libavformat/rawdec.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > this breaks fate-hevc-paramchange-yuv420p-yuv420p10
> > 
> > [...]
> > 
> 
> Only the (insignificant) timestamps are different.
> 
> This "fixes" it:
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 6c7ca0a..cccc591 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3143,7 +3143,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
>                  !st->codec->extradata)
>                  break;
>              if (st->first_dts == AV_NOPTS_VALUE &&
> -                !(ic->iformat->flags & AVFMT_NOTIMESTAMPS) &&
> +                /*!(ic->iformat->flags & AVFMT_NOTIMESTAMPS) &&*/
>                  st->codec_info_nb_frames < ic->max_ts_probe &&
>                  (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
>                   st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
> 
> I have no idea what this does, and it happens in
> avformat_find_stream_info(), which is satan.

the code waits for the first timestamp unless AVFMT_NOTIMESTAMPS is
set or some other threashold is reached
removing AVFMT_NOTIMESTAMPS would make the code wait for the first
timestamp for cases that do not have any timestamp

i have a mostly working solution in a branch locally but i need to
think about it a bit more and do more testing


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150418/95ed84d8/attachment.asc>


More information about the ffmpeg-devel mailing list