From 8b0e66a06f705d6559ae1813fde2b7a26bf166b1 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Fri, 15 Mar 2013 13:33:14 +0200 Subject: [PATCH] avcodec: flag blocks as corrupted if avpacket tells it is --- modules/codec/avcodec/encoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c index 930636e5dd..a9c700be9b 100644 --- a/modules/codec/avcodec/encoder.c +++ b/modules/codec/avcodec/encoder.c @@ -1035,6 +1035,8 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict ) p_block->i_pts = av_pkt.pts; p_block->i_dts = av_pkt.dts; + if( unlikely( av_pkt.flags & AV_PKT_FLAG_CORRUPT ) ) + p_block->i_flags |= BLOCK_FLAG_CORRUPTED; #endif switch ( p_sys->p_context->coded_frame->pict_type ) -- 2.39.2