[FFmpeg-trac] #5419(undetermined:new): HLS EXT-X-DISCONTINUITY tag is not supported
FFmpeg
trac at avcodec.org
Tue May 31 03:21:31 CEST 2016
#5419: HLS EXT-X-DISCONTINUITY tag is not supported
-------------------------------------+-------------------------------------
Reporter: xyq204101 | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: git-master | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by HoldenForever):
There have been many attempts to make this work from various people. Check
out AirStachPlayer hls.c file:
https://github.com/AirStash/AirStashPlayer/blob/d0013059c63cf0807196c1dd396aa4ba2bbc1663/android/contrib
/ffmpeg-x86_64/libavformat/hls.c
I have not made their implementation work as of yet. You can hack around
the problem by modifying the hls_read_packet function and change the end
of the function to:
/* If we got a packet, return it */
if (minplaylist >= 0) {
struct playlist *pls = c->playlists[minplaylist];
*pkt = pls->pkt;
pkt->stream_index += pls->stream_offset;
reset_packet(&c->playlists[minplaylist]->pkt);
if (pkt->dts != AV_NOPTS_VALUE)
c->cur_timestamp = av_rescale_q(pkt->dts,
pls->ctx->streams[pls->pkt.stream_index]->time_base,
AV_TIME_BASE_Q);
pkt->dts = AV_NOPTS_VALUE;
pkt->pts = AV_NOPTS_VALUE;
return 0;
}
return AVERROR_EOF;
Just add the 2 lines:
pkt->dts = AV_NOPTS_VALUE;
pkt->pts = AV_NOPTS_VALUE;
This seems to make FFMPEG handle #EXT-X-DISCONTINUITY
Obviously you will need to compile your own build to make this work.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5419#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list