if( p_enc->fmt_out.i_cat == VIDEO_ES && i_cat != VIDEO_ES )
{
msg_Err( p_enc, "\"%s\" is not a video encoder", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
_("\"%s\" is no video encoder."), psz_namecodec );
return VLC_EGENERIC;
}
if( p_enc->fmt_out.i_cat == AUDIO_ES && i_cat != AUDIO_ES )
{
msg_Err( p_enc, "\"%s\" is not an audio encoder", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
_("\"%s\" is no audio encoder."), psz_namecodec );
return VLC_EGENERIC;
}
if( !p_codec )
{
msg_Err( p_enc, "cannot find encoder %s", psz_namecodec );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
_("VLC could not find encoder \"%s\"."), psz_namecodec );
return VLC_EGENERIC;
}
p_context->max_b_frames =
__MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 );
p_context->b_frame_strategy = 0;
- if( !p_context->max_b_frames &&
+ if( !p_context->max_b_frames &&
( p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '2', 'v') ||
p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '1', 'v') ) )
p_context->flags |= CODEC_FLAG_LOW_DELAY;
{
vlc_mutex_unlock( lockval.p_address );
msg_Err( p_enc, "cannot open encoder" );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
_("VLC could not open the encoder.") );
free( p_sys );
return VLC_EGENERIC;
else
{
msg_Err( p_enc, "cannot open encoder" );
- intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
+ intf_UserFatal( p_enc, VLC_FALSE, _("Streaming / Transcoding failed"),
_("VLC could not open the encoder.") );
free( p_sys );
return VLC_EGENERIC;
{
if ( p_sys->b_trellis )
p_sys->p_context->flags |= CODEC_FLAG_TRELLIS_QUANT;
-
+
p_sys->p_context->noise_reduction =
p_sys->i_noise_reduction;
}
}
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 )
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") "