You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/asfdec_f: Do not print errors if packets do not start with ECC
There is nothing wrong with such packets, the spec allows this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -113,6 +113,8 @@ typedef struct ASFContext {
|
||||
|
||||
int no_resync_search;
|
||||
int export_xmp;
|
||||
|
||||
int uses_std_ecc;
|
||||
} ASFContext;
|
||||
|
||||
static const AVOption options[] = {
|
||||
@@ -956,6 +958,7 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
|
||||
int rsize = 8;
|
||||
int c, d, e, off;
|
||||
|
||||
if (asf->uses_std_ecc >= 0) {
|
||||
// if we do not know packet size, allow skipping up to 32 kB
|
||||
off = 32768;
|
||||
if (asf->no_resync_search)
|
||||
@@ -972,6 +975,10 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!asf->uses_std_ecc) {
|
||||
asf->uses_std_ecc = (c == 0x82 && !d && !e) ? 1 : -1;
|
||||
}
|
||||
|
||||
if (c != 0x82) {
|
||||
/* This code allows handling of -EAGAIN at packet boundaries (i.e.
|
||||
* if the packet sync code above triggers -EAGAIN). This does not
|
||||
@@ -995,6 +1002,10 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb)
|
||||
} else if(!avio_feof(pb)) {
|
||||
avio_seek(pb, -1, SEEK_CUR); // FIXME
|
||||
}
|
||||
} else {
|
||||
c = avio_r8(pb);
|
||||
d = avio_r8(pb);
|
||||
}
|
||||
|
||||
asf->packet_flags = c;
|
||||
asf->packet_property = d;
|
||||
|
Reference in New Issue
Block a user