mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-25 16:21:13 +00:00
avformat/ty: try harder to find stream signature
Search all chunks, not just first one. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
f7c01ff24d
commit
cdd19e2c56
@ -108,11 +108,16 @@ typedef struct TYDemuxContext {
|
|||||||
|
|
||||||
static int ty_probe(AVProbeData *p)
|
static int ty_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
if (AV_RB32(p->buf) == TIVO_PES_FILEID &&
|
int i;
|
||||||
AV_RB32(p->buf + 4) == 0x02 &&
|
|
||||||
AV_RB32(p->buf + 8) == CHUNK_SIZE) {
|
for (i = 0; i + 12 < p->buf_size; i += CHUNK_SIZE) {
|
||||||
return AVPROBE_SCORE_MAX;
|
if (AV_RB32(p->buf + i) == TIVO_PES_FILEID &&
|
||||||
|
AV_RB32(p->buf + i + 4) == 0x02 &&
|
||||||
|
AV_RB32(p->buf + i + 8) == CHUNK_SIZE) {
|
||||||
|
return AVPROBE_SCORE_MAX;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user