[vlc-commits] transcode: check codec aliasing for SPU also
Ilkka Ollakka
git at videolan.org
Sun Feb 9 10:34:16 CET 2014
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Feb 9 11:14:29 2014 +0200| [737dd5257af9237228a5baffcd84936c645f6800] | committer: Ilkka Ollakka
transcode: check codec aliasing for SPU also
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=737dd5257af9237228a5baffcd84936c645f6800
---
modules/stream_out/transcode/transcode.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index c0b4e65..a78f61d 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -413,9 +413,10 @@ static int Open( vlc_object_t *p_this )
psz_string = var_GetString( p_stream, SOUT_CFG_PREFIX "scodec" );
if( psz_string && *psz_string )
{
- char fcc[4] = " ";
+ char fcc[5] = " \0";
memcpy( fcc, psz_string, __MIN( strlen( psz_string ), 4 ) );
- p_sys->i_scodec = VLC_FOURCC( fcc[0], fcc[1], fcc[2], fcc[3] );
+ p_sys->i_scodec = vlc_fourcc_GetCodecFromString( SPU_ES, fcc );
+ msg_Dbg( p_stream, "Checking spu codec mapping for %s got %4.4s ", fcc, (char*)&p_sys->i_scodec);
}
free( psz_string );
@@ -555,7 +556,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
else if( p_fmt->i_cat == VIDEO_ES && p_sys->i_vcodec )
success = transcode_video_add(p_stream, p_fmt, id);
else if( ( p_fmt->i_cat == SPU_ES ) &&
- ( p_sys->i_scodec || p_sys->psz_senc || p_sys->b_soverlay ) )
+ ( p_sys->i_scodec || p_sys->b_soverlay ) )
success = transcode_spu_add(p_stream, p_fmt, id);
else if( !p_sys->b_osd && (p_sys->i_osdcodec != 0 || p_sys->psz_osdenc) )
success = transcode_osd_add(p_stream, p_fmt, id);
More information about the vlc-commits
mailing list