Commit c7f56591 authored by michael's avatar michael

fix demuxing of IMAG0002.ASF


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8558 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 90ce897e
...@@ -541,7 +541,7 @@ static int asf_get_packet(AVFormatContext *s) ...@@ -541,7 +541,7 @@ static int asf_get_packet(AVFormatContext *s)
ASFContext *asf = s->priv_data; ASFContext *asf = s->priv_data;
ByteIOContext *pb = &s->pb; ByteIOContext *pb = &s->pb;
uint32_t packet_length, padsize; uint32_t packet_length, padsize;
int rsize = 9; int rsize = 8;
int c, d, e, off; int c, d, e, off;
off= (url_ftell(&s->pb) - s->data_offset) % asf->packet_size + 3; off= (url_ftell(&s->pb) - s->data_offset) % asf->packet_size + 3;
...@@ -558,23 +558,21 @@ static int asf_get_packet(AVFormatContext *s) ...@@ -558,23 +558,21 @@ static int asf_get_packet(AVFormatContext *s)
if (!url_feof(pb)) if (!url_feof(pb))
av_log(s, AV_LOG_ERROR, "ff asf bad header %x at:%"PRId64"\n", c, url_ftell(pb)); av_log(s, AV_LOG_ERROR, "ff asf bad header %x at:%"PRId64"\n", c, url_ftell(pb));
} }
if ((c & 0x0f) == 2) { // always true for now if ((c & 0x8f) == 0x82) {
if (d || e) { if (d || e) {
if (!url_feof(pb)) if (!url_feof(pb))
av_log(s, AV_LOG_ERROR, "ff asf bad non zero\n"); av_log(s, AV_LOG_ERROR, "ff asf bad non zero\n");
return -1; return -1;
} }
c= get_byte(pb);
d= get_byte(pb); d= get_byte(pb);
e= get_byte(pb); rsize+=3;
rsize+=2; }else{
/* }else{ url_fseek(pb, -1, SEEK_CUR); //FIXME
if (!url_feof(pb))
printf("ff asf bad header %x at:%"PRId64"\n", c, url_ftell(pb));
return AVERROR_IO;*/
} }
asf->packet_flags = d; asf->packet_flags = c;
asf->packet_property = e; asf->packet_property = d;
DO_2BITS(asf->packet_flags >> 5, packet_length, asf->packet_size); DO_2BITS(asf->packet_flags >> 5, packet_length, asf->packet_size);
DO_2BITS(asf->packet_flags >> 1, padsize, 0); // sequence ignored DO_2BITS(asf->packet_flags >> 1, padsize, 0); // sequence ignored
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment