|
@@ -1,80 +0,0 @@
|
|
|
-From 953b373cbf149cdd28618cdabbdf97317517df14 Mon Sep 17 00:00:00 2001
|
|
|
-From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
|
|
|
-Date: Tue, 15 Sep 2015 15:51:14 +0200
|
|
|
-Subject: [PATCH 14/15] Revert "decoder: restart module if fmt_in is changed by
|
|
|
- the packetizer"
|
|
|
-
|
|
|
-This reverts commit 6e89372e4bfb3e2b0d5c55c3f31caddf42da1043.
|
|
|
----
|
|
|
- src/input/decoder.c | 46 ++++++++++++++++++++--------------------------
|
|
|
- 1 file changed, 20 insertions(+), 26 deletions(-)
|
|
|
-
|
|
|
-diff --git a/src/input/decoder.c b/src/input/decoder.c
|
|
|
-index 4d9809e..38b025c 100644
|
|
|
---- a/src/input/decoder.c
|
|
|
-+++ b/src/input/decoder.c
|
|
|
-@@ -1031,20 +1031,24 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block, bool b_flus
|
|
|
- while( (p_packetized_block =
|
|
|
- p_packetizer->pf_packetize( p_packetizer, p_block ? &p_block : NULL )) )
|
|
|
- {
|
|
|
-- if( !es_format_IsSimilar( &p_dec->fmt_in, &p_packetizer->fmt_out ) )
|
|
|
-+ if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
|
|
|
- {
|
|
|
-- msg_Dbg( p_dec, "restarting module due to input format change");
|
|
|
--
|
|
|
-- /* Drain the decoder module */
|
|
|
-- DecoderDecodeVideo( p_dec, NULL );
|
|
|
-- /* Restart the decoder module */
|
|
|
-- UnloadDecoder( p_dec );
|
|
|
-- if( LoadDecoder( p_dec, false, &p_packetizer->fmt_out ) )
|
|
|
-- {
|
|
|
-- p_dec->b_error = true;
|
|
|
-- block_ChainRelease( p_packetized_block );
|
|
|
-- return;
|
|
|
-- }
|
|
|
-+ es_format_Clean( &p_dec->fmt_in );
|
|
|
-+ es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
|
|
|
-+ }
|
|
|
-+
|
|
|
-+ /* If the packetizer provides aspect ratio information, pass it
|
|
|
-+ * to the decoder as a hint if the decoder itself can't provide
|
|
|
-+ * it. Copy it regardless of the current value of the decoder input
|
|
|
-+ * format aspect ratio, to properly propagate changes in aspect
|
|
|
-+ * ratio. */
|
|
|
-+ if( p_packetizer->fmt_out.video.i_sar_num > 0 &&
|
|
|
-+ p_packetizer->fmt_out.video.i_sar_den > 0)
|
|
|
-+ {
|
|
|
-+ p_dec->fmt_in.video.i_sar_num =
|
|
|
-+ p_packetizer->fmt_out.video.i_sar_num;
|
|
|
-+ p_dec->fmt_in.video.i_sar_den=
|
|
|
-+ p_packetizer->fmt_out.video.i_sar_den;
|
|
|
- }
|
|
|
-
|
|
|
- if( p_packetizer->pf_get_cc )
|
|
|
-@@ -1207,20 +1211,10 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block, bool b_flus
|
|
|
- while( (p_packetized_block =
|
|
|
- p_packetizer->pf_packetize( p_packetizer, p_block ? &p_block : NULL )) )
|
|
|
- {
|
|
|
-- if( !es_format_IsSimilar( &p_dec->fmt_in, &p_packetizer->fmt_out ) )
|
|
|
-+ if( p_packetizer->fmt_out.i_extra && !p_dec->fmt_in.i_extra )
|
|
|
- {
|
|
|
-- msg_Dbg( p_dec, "restarting module due to input format change");
|
|
|
--
|
|
|
-- /* Drain the decoder module */
|
|
|
-- DecoderDecodeAudio( p_dec, NULL );
|
|
|
-- /* Restart the decoder module */
|
|
|
-- UnloadDecoder( p_dec );
|
|
|
-- if( LoadDecoder( p_dec, false, &p_packetizer->fmt_out ) )
|
|
|
-- {
|
|
|
-- p_dec->b_error = true;
|
|
|
-- block_ChainRelease( p_packetized_block );
|
|
|
-- return;
|
|
|
-- }
|
|
|
-+ es_format_Clean( &p_dec->fmt_in );
|
|
|
-+ es_format_Copy( &p_dec->fmt_in, &p_packetizer->fmt_out );
|
|
|
- }
|
|
|
-
|
|
|
- while( p_packetized_block )
|
|
|
-2.5.1
|
|
|
-
|