diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 21:38:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 21:38:33 +0000 |
commit | f7835507cb1398d24cad5c9cda759846cd92da73 (patch) | |
tree | 54db12bd6731a428657bea2d24654a4f20a58c2c /libavformat/asf.c | |
parent | 92216453dbcce0f946eaf74bec075791a3edecb5 (diff) | |
download | ffmpeg-f7835507cb1398d24cad5c9cda759846cd92da73.tar.gz |
consistant error return for asf_get_packet()
Originally committed as revision 7657 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 052e78024a..3a34ca4e9a 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -466,6 +466,10 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) default: var = defval; break; \ } +/** + * + * @return <0 in case of an error + */ static int asf_get_packet(AVFormatContext *s) { ASFContext *asf = s->priv_data; @@ -483,7 +487,7 @@ static int asf_get_packet(AVFormatContext *s) if (get_le16(pb) != 0) { if (!url_feof(pb)) av_log(s, AV_LOG_ERROR, "ff asf bad non zero\n"); - return AVERROR_IO; + return -1; } rsize+=2; /* }else{ |