[FFmpeg-devel] [PATCH] avformat/hlsenc: refine EXT-X-BYTERANGE support for segments

Michael Niedermayer michael at niedermayer.cc
Sat Sep 17 20:07:42 EEST 2016


On Sat, Sep 17, 2016 at 01:09:02PM +0800, Steven Liu wrote:
[...]
> @@ -867,6 +886,16 @@ static int hls_write_header(AVFormatContext *s)
>      for (i = 0; i < s->nb_streams; i++) {
>          AVStream *inner_st;
>          AVStream *outer_st = s->streams[i];
> +
> +        if (hls->max_seg_size > 0) {
> +            if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
> +                outer_st->codecpar->bit_rate > hls->max_seg_size) {
> +                av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger than hls_segment_size, "
> +                       "%lld > %lld ( video birate > hls_segment_size ),the result maybe not you want.",
> +                       outer_st->codecpar->bit_rate, hls->max_seg_size);

%lld is the wrong type for *int64_t

The compiler should produce a warning for this, though probably not
every copiler does
please make sure your changes add no warnings

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160917/658e9eea/attachment.sig>


More information about the ffmpeg-devel mailing list