mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
swfdec: return correct error code at EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6c0a902d12
commit
99d7d1510e
@ -28,7 +28,7 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
|
|||||||
int tag, len;
|
int tag, len;
|
||||||
|
|
||||||
if (url_feof(pb))
|
if (url_feof(pb))
|
||||||
return -1;
|
return AVERROR_EOF;
|
||||||
|
|
||||||
tag = avio_rl16(pb);
|
tag = avio_rl16(pb);
|
||||||
len = tag & 0x3f;
|
len = tag & 0x3f;
|
||||||
@ -90,7 +90,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
uint64_t pos = avio_tell(pb);
|
uint64_t pos = avio_tell(pb);
|
||||||
tag = get_swf_tag(pb, &len);
|
tag = get_swf_tag(pb, &len);
|
||||||
if (tag < 0)
|
if (tag < 0)
|
||||||
return AVERROR(EIO);
|
return tag;
|
||||||
if (tag == TAG_VIDEOSTREAM) {
|
if (tag == TAG_VIDEOSTREAM) {
|
||||||
int ch_id = avio_rl16(pb);
|
int ch_id = avio_rl16(pb);
|
||||||
len -= 2;
|
len -= 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user