rtpdec_qt: Add an accidentally removed allocation return value check
authorMartin Storsjö <martin@martin.st>
Thu, 26 Sep 2013 13:34:59 +0000 (16:34 +0300)
committerMartin Storsjö <martin@martin.st>
Thu, 26 Sep 2013 20:13:50 +0000 (23:13 +0300)
This check was mistakenly removed in 5626f994f.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec_qt.c

index 146002a..8898f05 100644 (file)
@@ -180,6 +180,8 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
             av_freep(&qt->pkt.data);
             av_init_packet(&qt->pkt);
             qt->pkt.data = av_malloc(alen + FF_INPUT_BUFFER_PADDING_SIZE);
+            if (!qt->pkt.data)
+                return AVERROR(ENOMEM);
             qt->pkt.size = 0;
             qt->timestamp = *timestamp;
         }