On Wed, Jan 11, 2017 at 12:22:10PM -0700, John Stebbins wrote:
> --- a/libavformat/dv.c
> +++ b/libavformat/dv.c
> @@ -478,7 +478,7 @@ static int dv_read_header(AVFormatContext *s)
>  static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
>  {
> -    int size;
> +    int size, result;
>      RawDVContext *c = s->priv_data;
>  
> @@ -487,7 +487,10 @@ static int dv_read_packet(AVFormatContext *s, AVPacket 
> *pkt)
>          if (!c->dv_demux->sys)
>              return AVERROR(EIO);
>          size = c->dv_demux->sys->frame_size;
> -        if (avio_read(s->pb, c->buf, size) <= 0)
> +        result = avio_read(s->pb, c->buf, size);
> +        if (result == AVERROR_EOF)
> +            return result;
> +        if (result <= 0)
>              return AVERROR(EIO);

nit: The variable could have smaller scope.

Is there a specific problem that this fixes?

probably OK

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to