[vlc-commits] transcode: handle acodec aliases properly

Ilkka Ollakka git at videolan.org
Sat Jan 4 14:13:41 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Jan  4 15:09:47 2014 +0200| [5b227602021a811fe921db6bf9388f3a4d0ff516] | committer: Ilkka Ollakka

transcode: handle acodec aliases properly

Get correct fourcc for i_acodec instead creating fourcc directly from
user input.

Fixes #9755

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

 modules/stream_out/transcode/transcode.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index 4e994dd..c61f2b5 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -282,9 +282,10 @@ static int Open( vlc_object_t *p_this )
     p_sys->i_acodec = 0;
     if( psz_string && *psz_string )
     {
-        char fcc[4] = "    ";
+        char fcc[5] = "    \0";
         memcpy( fcc, psz_string, __MIN( strlen( psz_string ), 4 ) );
-        p_sys->i_acodec = VLC_FOURCC( fcc[0], fcc[1], fcc[2], fcc[3] );
+        p_sys->i_acodec = vlc_fourcc_GetCodecFromString( AUDIO_ES, fcc );
+        msg_Dbg( p_stream, "Checking codec mapping for %s got %4.4s ", fcc, (char*)&p_sys->i_acodec);
     }
     free( psz_string );
 



More information about the vlc-commits mailing list