summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-14 22:38:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-14 22:39:57 +0100
commit12e81041200d50bcc755e6b427a9e8f37ef9f212 (patch)
tree040918d7fb8defd9bd9ac2f649489c4416141535 /libavformat/rtpdec_h264.c
parent09c13ff7bdbc9cb6e1e33aae6c61b53ef0d426b7 (diff)
parent9aba0a6f7b3de9381930300f49a30eadfcb63bc6 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtpdec_h264: Check the return value of functions doing allocations See: c5f15f40b9b25f033fd9e8dd1e12763913098c11 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_h264.c')
-rw-r--r--libavformat/rtpdec_h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 8b9300e08c..1ca78bc81c 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -248,7 +248,8 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
if (pass == 0) {
/* now we know the total size of the packet (with the
* start sequences added) */
- av_new_packet(pkt, total_length);
+ if ((result = av_new_packet(pkt, total_length)) < 0)
+ return result;
dst = pkt->data;
} else {
assert(dst - pkt->data == total_length);