On Sun, Jul 16, 2017 at 12:24:06PM -0400, Sean McGovern wrote:
> --- a/libavformat/rmdec.c
> +++ b/libavformat/rmdec.c
> @@ -778,11 +779,17 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
>          } else {
> -            av_get_packet(pb, pkt, len);
> +            ret = av_get_packet(pb, pkt, len);
> +            if (ret < 0) {
> +                return ret;
> +            }
>              rm_ac3_swap_bytes(st, pkt);
>          }
>      } else
> -        av_get_packet(pb, pkt, len);
> +        ret = av_get_packet(pb, pkt, len);
> +        if (ret < 0) {
> +            return ret;
> +        }
>  
> @@ -798,14 +805,19 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext 
> *pb,
>      if (ast->deint_id == DEINT_ID_VBRF ||
> -        ast->deint_id == DEINT_ID_VBRS)
> -        av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - 
> rm->audio_pkt_cnt]);
> +        ast->deint_id == DEINT_ID_VBRS) {
> +        ret = av_get_packet(pb, pkt, 
> ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);
> +        if (ret < 0) {
> +            return ret;
> +        }

Drop the unnecessary {} ..

>      else {
> -        int ret = av_new_packet(pkt, st->codecpar->block_align);
> +        ret = av_new_packet(pkt, st->codecpar->block_align);
>          if (ret < 0)
>              return ret;

.. as the rest of the file does.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to