avcodec/mpegpicture: fix "stride changed" failures in gray mode
authorAman Gupta <aman@tmm1.net>
Tue, 10 Apr 2018 17:17:52 +0000 (10:17 -0700)
committerAman Gupta <aman@tmm1.net>
Wed, 11 Apr 2018 23:19:46 +0000 (16:19 -0700)
commit19128408ac3ab6524a9a519c12acef457baef2b9
tree0015aecd7baf33c972155338523095b5bd3c47ee
parent2108a6736f505d05f38932d57e8d9cfe8a7f7c81
avcodec/mpegpicture: fix "stride changed" failures in gray mode

Before adding uvlinesize check, I was seeing failures decoding
some video with ffmpeg compiled with --enable-gray and using AV_CODEC_FLAG_GRAY.

[mpeg2video @ 0x7fa193818c00] get_buffer() failed (stride changed: linesize=1280/1280 uvlinesize=0/640)
[mpeg2video @ 0x7fa193818c00] get_buffer() failed (stride changed: linesize=1280/1280 uvlinesize=0/640)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpegpicture.c