summaryrefslogtreecommitdiff
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-22 00:17:29 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-22 00:26:37 +0200
commit42316907b874fc7bc73ec227d2ad21774a662fc9 (patch)
treea7443915b2a618615ec02847b706595b4a36363a /libavformat/nutdec.c
parentdd3f1563d7666b631035644ea690c20b00ec91de (diff)
parentaf7ca6ea124b82b337a6b96e10963e88eba57ebe (diff)
downloadffmpeg-42316907b874fc7bc73ec227d2ad21774a662fc9.tar.gz
Merge commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe'
* commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe': nutdec: check av_new_packet return value Conflicts: libavformat/nutdec.c See: bb502411ddb9fe1928d4a999693a3a49b83f8698 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 0ecf2ec80d..ef29bdf79c 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -994,11 +994,10 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
{
AVFormatContext *s = nut->avf;
AVIOContext *bc = s->pb;
- int size, stream_id, discard;
+ int size, stream_id, discard, ret;
int64_t pts, last_IP_pts;
StreamContext *stc;
uint8_t header_idx;
- int ret;
size = decode_frame_header(nut, &pts, &stream_id, &header_idx, frame_code);
if (size < 0)
@@ -1020,8 +1019,9 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code)
return 1;
}
- if (av_new_packet(pkt, size + nut->header_len[header_idx]) < 0)
- return AVERROR(ENOMEM);
+ ret = av_new_packet(pkt, size + nut->header_len[header_idx]);
+ if (ret < 0)
+ return ret;
memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]);
pkt->pos = avio_tell(bc); // FIXME
if (stc->last_flags & FLAG_SM_DATA) {