avcodec/h264: Set CORRUPT flag on output frames that are not fully recovered
authorSebastian Dröge <sebastian@centricular.com>
Tue, 8 Dec 2015 08:24:09 +0000 (10:24 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 8 Dec 2015 17:09:27 +0000 (18:09 +0100)
commit9aebea0a4de1dc19c6309694cb1a5cd7554438cc
treefd3634151cc54131dcfaf1f180e4c77e21245870
parent503d8bf74a3874d8f038403882e60d410b88d287
avcodec/h264: Set CORRUPT flag on output frames that are not fully recovered

In the merge commit 78265fcfeee153e5e26ad4dbc7831a84ade447d6 this behaviour
was broken and the CORRUPT flag would never ever be set on a frame. However
the flag on the AVCodecContext was taken into account properly, including
AV_CODEC_FLAG2_SHOW_ALL.

The reason for this was that the recovered field of the next output picture
was always set to TRUE whenever one of the two AVCodecContext flags was set,
which made it impossible to detect later, before outputting, if the frame was
really recovered or not. Now don't set it to TRUE unless the frame is really
recovered and check the AVCodecContext flags right before outputting.

Signed-off-by: Sebastian Dröge <sebastian@centricular.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/h264.c