X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtpdec_mpa_robust.c;h=c0355edec2e273306ab63ab597c1df1eb885477b;hb=d92f38c179591a608390ffa9fee59c309142e79d;hp=f4716edf747b37573887a512508fc68bda6dae87;hpb=0a319bcce5714f7183b0537892f7d37d7a31493a;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;