X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtpdec_ac3.c;h=dd4a4e1054171b5017099a72c82c46b0f96f218b;hb=b9fff6e15e73dc995695db9be8db084238cca14c;hp=56a379f86ccc254cf798d08e07e61762495413e2;hpb=e4e04dce1fab81bcdef82e60184d50c73d212c6a;p=ffmpeg diff --git a/libavformat/rtpdec_ac3.c b/libavformat/rtpdec_ac3.c index 56a379f86cc..dd4a4e10541 100644 --- a/libavformat/rtpdec_ac3.c +++ b/libavformat/rtpdec_ac3.c @@ -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;