提交 5acdd6e6 编写于 作者: Z Zdenek Kabelac

* don't show header errors when eof is reached

Originally committed as revision 1165 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 9eb82647
...@@ -969,12 +969,14 @@ static int asf_get_packet(AVFormatContext *s) ...@@ -969,12 +969,14 @@ static int asf_get_packet(AVFormatContext *s)
int rsize = 11; int rsize = 11;
int c = get_byte(pb); int c = get_byte(pb);
if (c != 0x82) { if (c != 0x82) {
printf("BAD HRD %x at:%Ld\n", c, url_ftell(pb)); if (!url_feof(pb))
printf("ff asf bad header %x at:%Ld\n", c, url_ftell(pb));
return -EIO; return -EIO;
} }
if ((c & 0x0f) == 2) { // always true for now if ((c & 0x0f) == 2) { // always true for now
if (get_le16(pb) != 0) { if (get_le16(pb) != 0) {
printf("ff asf BAD NO ZERO\n"); if (!url_feof(pb))
printf("ff asf bad non zero\n");
return -EIO; return -EIO;
} }
} }
...@@ -1022,7 +1024,7 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1022,7 +1024,7 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
url_fskip(pb, ret); url_fskip(pb, ret);
ret = asf_get_packet(s); ret = asf_get_packet(s);
//printf("READ ASF PACKET %d r:%d c:%d\n", ret, asf->packet_size_left, pc++); //printf("READ ASF PACKET %d r:%d c:%d\n", ret, asf->packet_size_left, pc++);
if (ret < 0) if (ret < 0 || url_feof(pb))
return -EIO; return -EIO;
asf->packet_time_start = 0; asf->packet_time_start = 0;
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册