changeset 4823:4b571224b361 libavformat

Always return 0 if read_packet is successful.
author reimar
date Tue, 07 Apr 2009 21:25:02 +0000
parents a751c4815d2d
children ef55a8830c20
files nuv.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/nuv.c	Tue Apr 07 21:16:11 2009 +0000
+++ b/nuv.c	Tue Apr 07 21:25:02 2009 +0000
@@ -226,7 +226,8 @@
                 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 @@
                 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;