]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_ac3.c
avformat/avio: Add Metacube support
[ffmpeg] / libavformat / rtpdec_ac3.c
index 56a379f86ccc254cf798d08e07e61762495413e2..dd4a4e1054171b5017099a72c82c46b0f96f218b 100644 (file)
@@ -62,9 +62,9 @@ static int ac3_handle_packet(AVFormatContext *ctx, PayloadContext *data,
             av_log(ctx, AV_LOG_ERROR, "Invalid AC3 packet data\n");
             return AVERROR_INVALIDDATA;
         }
-        if (av_new_packet(pkt, len)) {
+        if ((err = av_new_packet(pkt, len)) < 0) {
             av_log(ctx, AV_LOG_ERROR, "Out of memory.\n");
-            return AVERROR(ENOMEM);
+            return err;
         }
 
         pkt->stream_index = st->index;