Commit b0723c8a authored by Reimar Döffinger's avatar Reimar Döffinger

Always return 0 if read_packet is successful.

Originally committed as revision 18360 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ac2b2226
...@@ -226,7 +226,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { ...@@ -226,7 +226,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
pkt->stream_index = ctx->v_id; pkt->stream_index = ctx->v_id;
memcpy(pkt->data, hdr, copyhdrsize); memcpy(pkt->data, hdr, copyhdrsize);
ret = get_buffer(pb, pkt->data + copyhdrsize, size); ret = get_buffer(pb, pkt->data + copyhdrsize, size);
return ret; if (ret < 0) return ret;
return 0;
case NUV_AUDIO: case NUV_AUDIO:
if (ctx->a_id < 0) { if (ctx->a_id < 0) {
av_log(s, AV_LOG_ERROR, "Audio packet in file without audio stream!\n"); 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) { ...@@ -238,7 +239,8 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
pkt->pos = pos; pkt->pos = pos;
pkt->pts = AV_RL32(&hdr[4]); pkt->pts = AV_RL32(&hdr[4]);
pkt->stream_index = ctx->a_id; pkt->stream_index = ctx->a_id;
return ret; if (ret < 0) return ret;
return 0;
case NUV_SEEKP: case NUV_SEEKP:
// contains no data, size value is invalid // contains no data, size value is invalid
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment