[FFmpeg-devel] [PATCH 2/2] avformat/hlsenc: fix missing first segment bug in fmp4 mode
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Oct 26 17:38:23 EEST 2017
2017-10-26 1:54 GMT+02:00 Steven Liu <lq at chinaffmpeg.org>:
> fix ticket id: #6776
> fix code logic error, need not check first segment.
>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> libavformat/hlsenc.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 55ce800c5a..caced6a3dd 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -1080,15 +1080,16 @@ static int hls_window(AVFormatContext *s, int last)
> avio_printf(out, ",BYTERANGE=\"%"PRId64"@%"PRId64"\"", en->size, en->pos);
> }
> avio_printf(out, "\n");
> - } else {
> - if (hls->flags & HLS_ROUND_DURATIONS)
> - avio_printf(out, "#EXTINF:%ld,\n", lrint(en->duration));
> - else
> - avio_printf(out, "#EXTINF:%f,\n", en->duration);
> - if (byterange_mode)
> - avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
> - en->size, en->pos);
> }
> +
> + if (hls->flags & HLS_ROUND_DURATIONS)
> + avio_printf(out, "#EXTINF:%ld,\n", lrint(en->duration));
> + else
> + avio_printf(out, "#EXTINF:%f,\n", en->duration);
> + if (byterange_mode)
> + avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
> + en->size, en->pos);
If you reindent in this patch, please add braces.
An alternative is to only remove the three lines in the first patch
(makes reviewing simpler) and send another patch with the
reindentation (and the braces).
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list