[FFmpeg-devel] [PATCH] avformat/hlsenc: refine EXT-X-BYTERANGE support for segments
Michael Niedermayer
michael at niedermayer.cc
Sat Sep 24 05:28:21 EEST 2016
On Mon, Sep 19, 2016 at 07:01:49AM +0800, Steven Liu wrote:
> 2016-09-19 0:24 GMT+08:00 Moritz Barsnick <barsnick at gmx.net>:
>
> > On Sun, Sep 18, 2016 at 23:40:34 +0800, Steven Liu wrote:
> >
> > > + if (byterange_mode) {
> > > + version = 4;
> > > + sequence = byterange_mode ? 0 : sequence;
> >
> > What does the ternary if-then-else operation do here? Two lines above,
> > byterange_mode was checked for !=0, how can it be anything else here?
> >
> > > + av_log(oc, AV_LOG_ERROR, "Invalid segment filename
> > template '%s', you can try use -use_localtime 1 with it\n", c->basename);
> >
> > "try to use"
> >
> > > + if ((outer_st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
> > &&
> > > + outer_st->codecpar->bit_rate > hls->max_seg_size) {
> >
> > Inconsistent use of brackets: The "==" comparison has extra brackets,
> > the ">" comparison doesn't. (Or am I missing something with operator
> > precedence?)
> >
> > > + av_log(s, AV_LOG_WARNING, "Your video bitrate is bigger
> > than hls_segment_size, "
> > > + "%"PRId64 " > %" PRId64" ( video birate >
> > hls_segment_size ),the result maybe not you want.",
> >
> > Apart from the peculiar placement of brackets in the message, I think
> > the brackets and their content is not needed, duplicate.
> >
> > And the sentence should end "the result may not be what you want".
> >
> > > + if (hls->start_pos >= hls->max_seg_size ) {
> >
> > Wrong bracket style (whitespace).
> >
> > > + {"hls_segment_size", "set maximum size per segment file, (in
> > bytes)", OFFSET(max_seg_size), AV_OPT_TYPE_INT, {.i64 = 0},
> > 0, INT_MAX, E},
> >
> > You can actually drop the word "set ", as well as the comma before the
> > brackets.
> >
> > Moritz
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> hlsenc.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 46 insertions(+), 3 deletions(-)
> 32c8c1dad25c71a089d1ef4c912de46e8b05f17a 0001-avformat-hlsenc-refine-EXT-X-BYTERANGE-support-for-s.patch
> From 3a8731792d681caec8ff49e01b1b175c00b9e1ee Mon Sep 17 00:00:00 2001
> From: Steven Liu <lingjiujianke at gmail.com>
> Date: Mon, 19 Sep 2016 07:00:42 +0800
> Subject: [PATCH] avformat/hlsenc: refine EXT-X-BYTERANGE support for segments
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- 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/20160924/2170681c/attachment.sig>
More information about the ffmpeg-devel
mailing list