[vlc-commits] codec: lpcm: prepare to put pf_packetize and pf_decode into a union

Zhao Zhili git at videolan.org
Tue Jun 19 11:26:35 CEST 2018


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri Jun  8 17:47:12 2018 +0800| [97cd77ef35b4302e8bf44590c284e94cc6020dc2] | committer: Thomas Guillem

codec: lpcm: prepare to put pf_packetize and pf_decode into a union

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

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

 modules/codec/lpcm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index bb92b13365..94996162ec 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -295,8 +295,10 @@ static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
     }
 
     /* Set callback */
-    p_dec->pf_decode    = DecodeFrame;
-    p_dec->pf_packetize = Packetize;
+    if( !b_packetizer )
+        p_dec->pf_decode    = DecodeFrame;
+    else
+        p_dec->pf_packetize = Packetize;
     p_dec->pf_flush     = Flush;
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list