X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtpdec_mpa_robust.c;h=c0355edec2e273306ab63ab597c1df1eb885477b;hb=704017d91ec8fbade0de072d222018c1a6013b70;hp=f4716edf747b37573887a512508fc68bda6dae87;hpb=b14761d1f8372dfe558193b8b754b9f1a858077d;p=ffmpeg diff --git a/libavformat/rtpdec_mpa_robust.c b/libavformat/rtpdec_mpa_robust.c index f4716edf747..c0355edec2e 100644 --- a/libavformat/rtpdec_mpa_robust.c +++ b/libavformat/rtpdec_mpa_robust.c @@ -90,9 +90,9 @@ static int mpa_robust_parse_packet(AVFormatContext *ctx, PayloadContext *data, return AVERROR_INVALIDDATA; } - if (av_new_packet(pkt, adu_size)) { + if ((err = av_new_packet(pkt, adu_size)) < 0) { av_log(ctx, AV_LOG_ERROR, "Out of memory.\n"); - return AVERROR(ENOMEM); + return err; } pkt->stream_index = st->index; @@ -120,9 +120,9 @@ static int mpa_robust_parse_packet(AVFormatContext *ctx, PayloadContext *data, if (!continuation && adu_size <= len) { /* One or more complete frames */ - if (av_new_packet(pkt, adu_size)) { + if ((err = av_new_packet(pkt, adu_size)) < 0) { av_log(ctx, AV_LOG_ERROR, "Out of memory.\n"); - return AVERROR(ENOMEM); + return err; } pkt->stream_index = st->index;