On Tue, Feb 07, 2017 at 02:15:55PM +0100, Alexandra Hájková wrote:
> the ASF specific Format Data size. Fixes video decoding problem
> part of the bug 1020.

See the other review for log message hints.

> --- a/libavformat/asfdec.c
> +++ b/libavformat/asfdec.c
> @@ -691,16 +691,18 @@ static int asf_read_properties(AVFormatContext *s, 
> const GUIDParseTable *g)
>  
>  static int parse_video_info(AVIOContext *pb, AVStream *st)
>  {
> +    uint16_t size_;
> +    uint32_t size;
>      unsigned int tag;

Please use descriptive variable names.

> --- a/libavformat/riff.h
> +++ b/libavformat/riff.h
> @@ -43,7 +43,7 @@ void ff_end_tag(AVIOContext *pb, int64_t start);
>   * bits_per_encoded_sample fields. Does not read extradata.
>   * @return codec tag
>   */
> -int ff_get_bmp_header(AVIOContext *pb, AVStream *st);
> +int ff_get_bmp_header(AVIOContext *pb, AVStream *st, uint32_t *size);

The documentation is now incomplete.

Why uint32_t? Sizes should have size_t as type.

> --- a/libavformat/riffdec.c
> +++ b/libavformat/riffdec.c
> @@ -180,10 +180,12 @@ enum AVCodecID ff_wav_codec_get_id(unsigned int tag, 
> int bps)
>  
> -int ff_get_bmp_header(AVIOContext *pb, AVStream *st)
> +int ff_get_bmp_header(AVIOContext *pb, AVStream *st, uint32_t *size)
>  {
>      int tag1;
> -    avio_rl32(pb); /* size */
> +    uint32_t size_ = avio_rl32(pb); /* size */

The comment adds no information.

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

Reply via email to