From: Steven Liu <lingjiujianke@gmail.com>
To: Li Kai <wolfleekay@gmail.com>
Cc: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avformat/hls:use EXT-X-START instead of live_start_index if it's in playlist
Date: Mon, 27 Jun 2022 10:23:11 +0800
Message-ID: <CADxeRwm=Nr4qoXQMwJG9b5pHJ_v5nZkcuiXy=vh3nXTDGsQ_bA@mail.gmail.com> (raw)
In-Reply-To: <CACGufqSYj=OzFefuu9g=1n3AWrrQ3neSqGTyKdTZ95dSXr1MJg@mail.gmail.com>
Li Kai <wolfleekay@gmail.com> 于2022年6月25日周六 22:15写道:
>
> OK, I add the option description in doc/demuxers.texi.
>
> About invalid EXT-X-START value, it's not played on Safari.
> So I make it error to handle.
>
> You opinion, it's better way. The latest patch fix it.
>
>
>
@@ -741,6 +744,7 @@ static int parse_playlist(HLSContext *c, const char *url,
struct segment **prev_segments = NULL;
int prev_n_segments = 0;
int64_t prev_start_seq_no = -1;
+ const char *p;
if (is_http && !in && c->http_persistent && c->playlist_pb) {
in = c->playlist_pb;
@@ -889,6 +893,20 @@ static int parse_playlist(HLSContext *c, const char *url,
cur_init_section->key = NULL;
}
+ } else if (av_strstart(line, "#EXT-X-START:", &ptr)) {
Can the "const char *p;" move to here? And maybe make a clarify name
will better i think, e.g. const char *time_offset_value?
+ ret = ensure_playlist(c, &pls, url);
+ if (ret < 0) {
+ goto fail;
+ }
+ if (av_strstart(ptr, "TIME-OFFSET=", &p)) {
+ float offset = strtof(p, NULL);
+ pls->start_time_offset = offset * AV_TIME_BASE;
+ pls->time_offset_flag = 1;
+ } else {
+ av_log(c->ctx, AV_LOG_WARNING, "#EXT-X-START value is"
+ "invalid, it will be ignored");
+ continue;
+ }
} else if (av_strstart(line, "#EXT-X-ENDLIST", &ptr)) {
if (pls)
pls->finished = 1;
Thanks
Steven
_______________________________________________
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".
next prev parent reply other threads:[~2022-06-27 2:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 15:00 wolfleekay
2022-06-24 1:50 ` Steven Liu
2022-06-24 3:58 ` 少宇李
2022-06-24 6:21 ` Steven Liu
2022-06-25 4:32 ` 少宇李
2022-06-25 4:51 ` Steven Liu
2022-06-25 5:23 ` Li Kai
2022-06-25 5:24 ` Li Kai
2022-06-25 13:26 ` Steven Liu
2022-06-25 14:15 ` Li Kai
2022-06-27 2:23 ` Steven Liu [this message]
2022-06-27 2:58 ` Li Kai
2022-06-27 3:05 ` Steven Liu
2022-06-29 4:17 ` Steven Liu
2022-06-24 16:44 Li Kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADxeRwm=Nr4qoXQMwJG9b5pHJ_v5nZkcuiXy=vh3nXTDGsQ_bA@mail.gmail.com' \
--to=lingjiujianke@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=wolfleekay@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git