[FFmpeg-devel] [PATCH] avformat/hls: inherite AVInputFormat.flags from underlying demuxer

Zhang Rui bbcallen at gmail.com
Thu Jul 18 04:42:07 CEST 2013


2013/7/18 Michael Niedermayer <michaelni at gmx.at>:
> On Wed, Jul 17, 2013 at 11:41:52PM +0800, Zhang Rui wrote:
>> 2013/7/17 Michael Niedermayer <michaelni at gmx.at>:
>> >
>> > yes or have 2 such structs one with and one without
>> > or we would have to move the flag to the AVFormatContext
>>
>> Since mpegts is always used, maybe 1 struct with AVFMT_TS_DISCONT
>> is enough for now?
>
> Does the hls demuxer return timestamp discontinuities ?

Yes, FFplay (based on tag n2.0) calculates insane delay in video_refresh(),
after reach the discontinuity point in my test hls stream.

if (!isnan(last_duration) && last_duration > 0 && last_duration <
is->max_frame_duration) {
    /* if duration of the last frame was sane, update last_duration in
video state */
    /* large max_frame_duration prevent last_duration been updated here */
    is->frame_last_duration = last_duration;
}

That make video output freeze to wait for the insane delay, while
audio is going on.

> if it does, can this not be avoided ?

I've no idea. I thought AVFMT_TS_DISCONT was the fast and right fix.
At least it works for my situation.

May I have your suggestion, where I should look into for a proper fix?


More information about the ffmpeg-devel mailing list