]> git.sesse.net Git - vlc/commitdiff
transcode: handle acodec aliases properly
authorIlkka Ollakka <ileoo@videolan.org>
Sat, 4 Jan 2014 13:09:47 +0000 (15:09 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sat, 4 Jan 2014 13:10:48 +0000 (15:10 +0200)
Get correct fourcc for i_acodec instead creating fourcc directly from
user input.

Fixes #9755

modules/stream_out/transcode/transcode.c

index 4e994ddfc6aa3091aa7f7b3fb4583754969b7a08..c61f2b5fcba64fcd96ec988d5ab07085224a3aa8 100644 (file)
@@ -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 );