[vlc-commits] transcode: disable hardware decoding by default
Rémi Denis-Courmont
git at videolan.org
Sat Jun 7 18:28:02 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 7 19:18:21 2014 +0300| [84b23f9606eec5d6d6aa9369cb284bf5531a16a7] | committer: Rémi Denis-Courmont
transcode: disable hardware decoding by default
It can still be enabled manually in the preferences as in previous
versions. Only it will not be used with the default ("auto") setting.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84b23f9606eec5d6d6aa9369cb284bf5531a16a7
---
modules/codec/avcodec/avcodec.c | 2 +-
modules/stream_out/transcode/transcode.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 0695257..7046061 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -135,7 +135,7 @@ vlc_module_begin ()
add_obsolete_string( "ffmpeg-codec" ) /* removed since 2.1.0 */
add_string( "avcodec-codec", NULL, CODEC_TEXT, CODEC_LONGTEXT, true )
add_obsolete_bool( "ffmpeg-hw" ) /* removed since 2.1.0 */
- add_module( "avcodec-hw", "hw decoder", NULL, HW_TEXT, HW_LONGTEXT, false )
+ add_module( "avcodec-hw", "hw decoder", "any", HW_TEXT, HW_LONGTEXT, false )
#if defined(FF_THREAD_FRAME)
add_obsolete_integer( "ffmpeg-threads" ) /* removed since 2.1.0 */
add_integer( "avcodec-threads", 0, THREADS_TEXT, THREADS_LONGTEXT, true );
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index e5f9f9e..e925e80 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -383,6 +383,12 @@ static int Open( vlc_object_t *p_this )
p_sys->f_scale, p_sys->i_vbitrate / 1000 );
}
+ /* Disable hardware decoding by default (unlike normal playback) */
+ psz_string = var_CreateGetString( p_stream, "avcodec-hw" );
+ if( !strcasecmp( "any", psz_string ) )
+ var_SetString( p_stream, "avcodec-hw", "none" );
+ free( psz_string );
+
/* Subpictures transcoding parameters */
p_sys->p_spu = NULL;
p_sys->p_spu_blend = NULL;
More information about the vlc-commits
mailing list