[vlc-commits] mux: add case for MP3 in muxers as it' s not different codec that default mpga
Ilkka Ollakka
git at videolan.org
Tue Feb 18 18:57:39 CET 2014
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Feb 18 19:54:36 2014 +0200| [b69ad311e33493c9bfe09e9299f37b1ea114df80] | committer: Ilkka Ollakka
mux: add case for MP3 in muxers as it's not different codec that default mpga
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b69ad311e33493c9bfe09e9299f37b1ea114df80
---
modules/mux/asf.c | 6 ++----
modules/mux/avi.c | 2 +-
modules/mux/mpeg/ts.c | 4 +++-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 5b3f884..c8d98eb 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -374,22 +374,20 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
tk->psz_name = "MPEG-4 Audio";
i_bitspersample = 0;
break;
- case VLC_CODEC_MPGA:
-#if 1
+ case VLC_CODEC_MP3:
tk->psz_name = "MPEG Audio Layer 3";
tk->i_tag = WAVE_FORMAT_MPEGLAYER3;
i_bitspersample = 0;
i_blockalign = 1;
i_extra = 12;
break;
-#else
+ case VLC_CODEC_MPGA:
tk->psz_name = "MPEG Audio Layer 1/2";
tk->i_tag = WAVE_FORMAT_MPEG;
i_bitspersample = 0;
i_blockalign = 1;
i_extra = 22;
break;
-#endif
case VLC_CODEC_WMA1:
tk->psz_name = "Windows Media Audio v1";
tk->i_tag = WAVE_FORMAT_WMA1;
diff --git a/modules/mux/avi.c b/modules/mux/avi.c
index 1ab1631..bc72fc1 100644
--- a/modules/mux/avi.c
+++ b/modules/mux/avi.c
@@ -343,7 +343,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_wf->wFormatTag = WAVE_FORMAT_A52;
p_wf->nBlockAlign= 1;
break;
- case VLC_CODEC_MPGA:
+ case VLC_CODEC_MP3:
p_wf->wFormatTag = WAVE_FORMAT_MPEGLAYER3;
p_wf->nBlockAlign= 1;
break;
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index e631e7e..e629a70 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -935,6 +935,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
/* AUDIO */
case VLC_CODEC_MPGA:
+ case VLC_CODEC_MP3:
p_stream->i_stream_type =
p_input->p_fmt->audio.i_rate >= 32000 ? 0x03 : 0x04;
p_stream->i_stream_id = 0xc0;
@@ -1289,7 +1290,8 @@ static bool MuxStreams(sout_mux_t *p_mux )
block_t *p_data;
if( p_stream == p_pcr_stream || p_sys->b_data_alignment
- || p_input->p_fmt->i_codec != VLC_CODEC_MPGA )
+ || ((p_input->p_fmt->i_codec != VLC_CODEC_MPGA ) &&
+ (p_input->p_fmt->i_codec != VLC_CODEC_MP3) ) )
{
p_data = block_FifoGet( p_input->p_fifo );
if (p_data->i_pts <= VLC_TS_INVALID)
More information about the vlc-commits
mailing list