diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-07 21:25:02 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-04-07 21:25:02 +0000 |
commit | b0723c8a12c1371016e97eb2d8efea52f8fdaf41 (patch) | |
tree | 11253faa2cd644856f267e0a42d892f013d2885f | |
parent | ac2b2226ac2c5e151bcf0760948a775329ef21b3 (diff) | |
download | ffmpeg-b0723c8a12c1371016e97eb2d8efea52f8fdaf41.tar.gz |
Always return 0 if read_packet is successful.
Originally committed as revision 18360 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nuv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c index 2d6e93a79c..b643229429 100644 --- a/libavformat/nuv.c +++ b/libavformat/nuv.c @@ -226,7 +226,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { pkt->stream_index = ctx->v_id; memcpy(pkt->data, hdr, copyhdrsize); ret = get_buffer(pb, pkt->data + copyhdrsize, size); - return ret; + if (ret < 0) return ret; + return 0; case NUV_AUDIO: if (ctx->a_id < 0) { av_log(s, AV_LOG_ERROR, "Audio packet in file without audio stream!\n"); @@ -238,7 +239,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { pkt->pos = pos; pkt->pts = AV_RL32(&hdr[4]); pkt->stream_index = ctx->a_id; - return ret; + if (ret < 0) return ret; + return 0; case NUV_SEEKP: // contains no data, size value is invalid break; |