Commit cb16ed21 authored by Gildas Bazin's avatar Gildas Bazin

* modules/stream_out/transcode.c: don't crash when the user specifies a...

* modules/stream_out/transcode.c: don't crash when the user specifies a acodec/vcodec with more the 4 characters in length.
* modules/gui/wxwindows/streamout.cpp: grrr, thought I add committed this stuff.
parent 6a35747e
......@@ -2,7 +2,7 @@
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: streamout.cpp,v 1.36 2003/11/23 20:37:04 gbazin Exp $
* $Id: streamout.cpp,v 1.37 2003/11/27 10:34:51 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -659,8 +659,8 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
wxT("mpga"),
wxT("mp3"),
wxT("a52"),
wxT("vorb")
wxT("flac")
wxT("vorb"),
wxT("flac"),
wxT("spx")
};
static const wxString abitrates_array[] =
......
......@@ -2,7 +2,7 @@
* transcode.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: transcode.c,v 1.53 2003/11/22 13:49:12 gbazin Exp $
* $Id: transcode.c,v 1.54 2003/11/27 10:34:51 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
......@@ -155,7 +155,7 @@ static int Open( vlc_object_t *p_this )
char fcc[4] = " ";
char *val;
memcpy( fcc, codec, strlen( codec ) );
memcpy( fcc, codec, __MIN( strlen( codec ), 4 ) );
p_sys->i_acodec = VLC_FOURCC( fcc[0], fcc[1], fcc[2], fcc[3] );
......@@ -186,7 +186,7 @@ static int Open( vlc_object_t *p_this )
char fcc[4] = " ";
char *val;
memcpy( fcc, codec, strlen( codec ) );
memcpy( fcc, codec, __MIN( strlen( codec ), 4 ) );
p_sys->i_vcodec = VLC_FOURCC( fcc[0], fcc[1], fcc[2], fcc[3] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment