X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtpdec_h263.c;h=1905b435f8e1482a5c09f3764cc089807b0b3031;hb=4236e87f502e68acb949ea4ae6f5ebd889377b60;hp=9b71ed7efe9d7aec7f0022f5fb410b1a9d5f769a;hpb=e4e04dce1fab81bcdef82e60184d50c73d212c6a;p=ffmpeg diff --git a/libavformat/rtpdec_h263.c b/libavformat/rtpdec_h263.c index 9b71ed7efe9..1905b435f8e 100644 --- a/libavformat/rtpdec_h263.c +++ b/libavformat/rtpdec_h263.c @@ -30,7 +30,7 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, { uint8_t *ptr; uint16_t header; - int startcode, vrc, picture_header; + int startcode, vrc, picture_header, ret; if (len < 2) { av_log(ctx, AV_LOG_ERROR, "Too short H.263 RTP packet\n"); @@ -73,9 +73,9 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, return AVERROR_INVALIDDATA; } - if (av_new_packet(pkt, len + startcode)) { + if ((ret = av_new_packet(pkt, len + startcode)) < 0) { av_log(ctx, AV_LOG_ERROR, "Out of memory\n"); - return AVERROR(ENOMEM); + return ret; } pkt->stream_index = st->index; ptr = pkt->data;