[vlc-commits] rawvideo: Revert "only copy the input es_format_t on output for the decoder"

Pierre Lamot git at videolan.org
Fri Sep 15 09:21:02 CEST 2017


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 14 09:45:25 2017 +0200| [8c525fa3c40f69f793839dfa7f2e44e84743fbde] | committer: Thomas Guillem

rawvideo: Revert "only copy the input es_format_t on output for the decoder"

This reverts commit ac2886e617b9ba25d3c6f2d52a1bdaf020f119a7.

Packetizer and decoder have their fmt_out initialized to 0 before beeing
opened, they have to provide fmt_out. Raw video should provide the same format
as its input.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c525fa3c40f69f793839dfa7f2e44e84743fbde
---

 modules/codec/rawvideo.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index 9c5853bed6..b616ddfdd4 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -76,7 +76,7 @@ vlc_module_end ()
 /**
  * Common initialization for decoder and packetizer
  */
-static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
+static int OpenCommon( decoder_t *p_dec )
 {
     const vlc_chroma_description_t *dsc =
         vlc_fourcc_GetChromaDescription( p_dec->fmt_in.i_codec );
@@ -100,8 +100,7 @@ static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
     if( !p_dec->fmt_in.video.i_visible_height )
         p_dec->fmt_in.video.i_visible_height = p_dec->fmt_in.video.i_height;
 
-    if ( !b_packetizer )
-        es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
+    es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
 
     if( p_dec->fmt_out.video.i_frame_rate == 0 ||
         p_dec->fmt_out.video.i_frame_rate_base == 0)
@@ -269,7 +268,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t *)p_this;
 
-    int ret = OpenCommon( p_dec, false );
+    int ret = OpenCommon( p_dec );
     if( ret == VLC_SUCCESS )
     {
         p_dec->pf_decode = DecodeFrame;
@@ -307,7 +306,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t *)p_this;
 
-    int ret = OpenCommon( p_dec, true );
+    int ret = OpenCommon( p_dec );
     if( ret == VLC_SUCCESS )
         p_dec->pf_packetize = SendFrame;
     return ret;



More information about the vlc-commits mailing list