mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
avviddec: Mark frames as corrupted if libav tells us they are
This is currently only implemented by the h264 codec. https://bugzilla.gnome.org/show_bug.cgi?id=722290
This commit is contained in:
parent
ca1b5d8576
commit
b278ca55be
1 changed files with 6 additions and 0 deletions
|
@ -1291,6 +1291,8 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
|||
ffmpegdec->picture->repeat_pict);
|
||||
GST_DEBUG_OBJECT (ffmpegdec, "interlaced_frame:%d (current:%d)",
|
||||
ffmpegdec->picture->interlaced_frame, ffmpegdec->ctx_interlaced);
|
||||
GST_DEBUG_OBJECT (ffmpegdec, "corrupted frame: %d",
|
||||
! !(ffmpegdec->picture->flags & AV_FRAME_FLAG_CORRUPT));
|
||||
|
||||
if (G_UNLIKELY (ffmpegdec->picture->interlaced_frame !=
|
||||
ffmpegdec->ctx_interlaced)) {
|
||||
|
@ -1307,6 +1309,10 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
|||
if (G_UNLIKELY (*ret != GST_FLOW_OK))
|
||||
goto no_output;
|
||||
|
||||
/* Mark corrupted frames as corrupted */
|
||||
if (ffmpegdec->picture->flags & AV_FRAME_FLAG_CORRUPT)
|
||||
GST_BUFFER_FLAG_SET (out_frame->output_buffer, GST_BUFFER_FLAG_CORRUPTED);
|
||||
|
||||
if (ffmpegdec->ctx_interlaced) {
|
||||
/* set interlaced flags */
|
||||
if (ffmpegdec->picture->repeat_pict)
|
||||
|
|
Loading…
Reference in a new issue