You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/samidec: do not include trailing sami footer in the last packet
Signed-off-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
@@ -68,11 +68,17 @@ static int sami_read_header(AVFormatContext *s)
|
|||||||
while (!ff_text_eof(&tr)) {
|
while (!ff_text_eof(&tr)) {
|
||||||
AVPacket *sub;
|
AVPacket *sub;
|
||||||
const int64_t pos = ff_text_pos(&tr) - (c != 0);
|
const int64_t pos = ff_text_pos(&tr) - (c != 0);
|
||||||
int is_sync, n = ff_smil_extract_next_text_chunk(&tr, &buf, &c);
|
int is_sync, is_body, n = ff_smil_extract_next_text_chunk(&tr, &buf, &c);
|
||||||
|
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
is_body = !av_strncasecmp(buf.str, "</BODY", 6);
|
||||||
|
if (is_body) {
|
||||||
|
av_bprint_clear(&buf);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
is_sync = !av_strncasecmp(buf.str, "<SYNC", 5);
|
is_sync = !av_strncasecmp(buf.str, "<SYNC", 5);
|
||||||
if (is_sync)
|
if (is_sync)
|
||||||
got_first_sync_point = 1;
|
got_first_sync_point = 1;
|
||||||
|
Reference in New Issue
Block a user