Commit 65f5f148 authored by Antoine Cellerier's avatar Antoine Cellerier

* Fix ffmpeg muxer. (flv muxing now works with ./vlc --sout...

 * Fix ffmpeg muxer. (flv muxing now works with ./vlc  --sout "#transcode{vcodec=FLV1,acodec=mp3}:std{mux=ffmpeg{mux=flv},access=file,dst=test.flv}" -vvv --color ~/media/pinball-bit-rate-vbr-peak.wmv -I dummy) Include 2 hacks ... if someone has a better way to do it feel free to do so.
 * Remove a bunch of trailing white spaces.
parent f56fb678
......@@ -248,7 +248,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
}
codec->bit_rate = p_input->p_fmt->i_bitrate;
codec->codec_tag = p_input->p_fmt->i_codec;
/* This is a hack */
if( i_codec_id == CODEC_ID_MP2 )
i_codec_id = CODEC_ID_MP3;
codec->codec_tag = av_codec_get_tag( p_sys->oc->oformat->codec_tag, i_codec_id );//p_input->p_fmt->i_codec;
codec->codec_id = i_codec_id;
if( p_input->p_fmt->i_extra )
......@@ -338,6 +341,9 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
pkt.dts = p_data->i_dts * p_stream->time_base.den /
I64C(1000000) / p_stream->time_base.num;
/* this is another hack to prevent libavformat from triggering the "non monotone timestamps" check in avformat/utils.c */
p_stream->cur_dts = AV_NOPTS_VALUE;
if( av_write_frame( p_sys->oc, &pkt ) < 0 )
{
msg_Err( p_mux, "could not write frame (pts: "I64Fd", dts: "I64Fd") "
......
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