Message ID | tencent_8133F65376B5CD090D0EAFC5451317C84705@qq.com |
---|---|
State | Accepted |
Commit | 17756882920cbc8620251b81da433374cd685dda |
Headers | show |
Series | [FFmpeg-devel] avformat/hlsenc: EXT-X-I-FRAMES-ONLY requires version 4 or higher | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
> On Jan 16, 2021, at 12:47 AM, Zhao Zhili <quinkblack@foxmail.com> wrote: > > --- > libavformat/hlsenc.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index cafe0e8c69..d376fc6f08 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1564,6 +1564,10 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) > sequence = 0; > } > > + if (hls->flags & HLS_I_FRAMES_ONLY) { > + hls->version = 4; > + } > + > if (hls->flags & HLS_INDEPENDENT_SEGMENTS) { > hls->version = 6; > } Current implementation only takes HLS_SINGLE_FILE mode into consideration. I_FRMAMES_ONLY should works without SINGLE_FILE mode by dropping non-key frame packets. This patch doesn't consider that issue. > -- > 2.27.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index cafe0e8c69..d376fc6f08 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1564,6 +1564,10 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs) sequence = 0; } + if (hls->flags & HLS_I_FRAMES_ONLY) { + hls->version = 4; + } + if (hls->flags & HLS_INDEPENDENT_SEGMENTS) { hls->version = 6; }