[vlc-devel] [PATCH] avcodec: Always output frames

Luca Barbato lu_zero at gentoo.org
Sat Dec 28 10:15:35 CET 2013


With the introduction of CODEC_FLAG_OUTPUT_CORRUPT incomplete frames
are silently dropped. Enable it to maintain the previous behaviour.
---

This does not solve the fact the h264 packetizer or the default ts demuxer
mangles certain bitstreams, but maintains the behaviour consistent.

 modules/codec/avcodec/video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 543640f..df0f10a 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -232,6 +232,9 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     if( var_CreateGetBool( p_dec, "grayscale" ) )
         p_sys->p_context->flags |= CODEC_FLAG_GRAY;

+    /* ***** Output always the frames ***** */
+    p_sys->p_context->flags |= CODEC_FLAG_OUTPUT_CORRUPT;
+
     i_val = var_CreateGetInteger( p_dec, "avcodec-vismv" );
     if( i_val ) p_sys->p_context->debug_mv = i_val;

--
1.8.5.1




More information about the vlc-devel mailing list