mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-11 09:07:29 +00:00
avformat/mpegts.c: ignore a section with next flag
'current_next_indicator' of 0 (next) on each section header indicates the service information is for immediate future one. ffmpeg doesn't need to parse it but current (1) one. ref: section 5.1.1 of DVB BlueBook A038 (EN 300 468) Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
5dcedfcd17
commit
ad063e6e10
@ -645,6 +645,7 @@ typedef struct SectionHeader {
|
|||||||
uint8_t tid;
|
uint8_t tid;
|
||||||
uint16_t id;
|
uint16_t id;
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
|
uint8_t current_next;
|
||||||
uint8_t sec_num;
|
uint8_t sec_num;
|
||||||
uint8_t last_sec_num;
|
uint8_t last_sec_num;
|
||||||
} SectionHeader;
|
} SectionHeader;
|
||||||
@ -773,6 +774,7 @@ static int parse_section_header(SectionHeader *h,
|
|||||||
if (val < 0)
|
if (val < 0)
|
||||||
return val;
|
return val;
|
||||||
h->version = (val >> 1) & 0x1f;
|
h->version = (val >> 1) & 0x1f;
|
||||||
|
h->current_next = val & 0x01;
|
||||||
val = get8(pp, p_end);
|
val = get8(pp, p_end);
|
||||||
if (val < 0)
|
if (val < 0)
|
||||||
return val;
|
return val;
|
||||||
@ -2332,6 +2334,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
|||||||
return;
|
return;
|
||||||
if (h->tid != PMT_TID)
|
if (h->tid != PMT_TID)
|
||||||
return;
|
return;
|
||||||
|
if (!h->current_next)
|
||||||
|
return;
|
||||||
if (skip_identical(h, tssf))
|
if (skip_identical(h, tssf))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2541,6 +2545,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
|||||||
return;
|
return;
|
||||||
if (h->tid != PAT_TID)
|
if (h->tid != PAT_TID)
|
||||||
return;
|
return;
|
||||||
|
if (!h->current_next)
|
||||||
|
return;
|
||||||
if (ts->skip_changes)
|
if (ts->skip_changes)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2679,6 +2685,8 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
|||||||
return;
|
return;
|
||||||
if (h->tid != SDT_TID)
|
if (h->tid != SDT_TID)
|
||||||
return;
|
return;
|
||||||
|
if (!h->current_next)
|
||||||
|
return;
|
||||||
if (ts->skip_changes)
|
if (ts->skip_changes)
|
||||||
return;
|
return;
|
||||||
if (skip_identical(h, tssf))
|
if (skip_identical(h, tssf))
|
||||||
|
Loading…
Reference in New Issue
Block a user