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

Zhang Rui bbcallen at gmail.com
Fri Jul 19 09:14:18 CEST 2013


2013/7/18 Michael Niedermayer <michaelni at gmx.at>:
> On Thu, Jul 18, 2013 at 10:42:07AM +0800, Zhang Rui wrote:
>> I've no idea. I thought AVFMT_TS_DISCONT was the fast and right fix.
>> At least it works for my situation.
>
> have you checked that seeking stil works with the tag ?

Seeking doesn't work at all, with or without this tag.
The VOD stream reset its pts to zero for every few minutes.
But hls demuxer doen't handle #EXT-X-DISCONTINUITY at all.

HLSContext.seek_timestamp is absolute position for whole stream.
The seeking target may never reach, if it's greater than the reset
period (max pts),

I work around it in a hack way, to pretend to have continues pts.
https://github.com/bbcallen/FFmpeg/commit/7d154d23c7a6b41da58bc40d3848f46d2eef8496

I think my insane-frame-duration problem comes from the hack fix,
but not from code on master. so, AVFMT_TS_DISCONT tag may be
not necessary for master.

Anyhow, thanks a lot for your reply.

> I thought the EXTINF duration could be used but possbly this is not
> the case. They dont seem to be precisse enough (with seconds in
> integers)

BTW: Is it necessary to store EXTINF duration as float, since some hls server
provide float duration?


More information about the ffmpeg-devel mailing list