Currently, the libavformat based muxer supports audio and video streams
properly. Subtitle muxing is still a work-in-progress. Till those are
verified to work as well, we need to ensure that we don't create AVStreams
with invalid codec type.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
p_input->p_sys = malloc( sizeof( int ) );
*((int *)p_input->p_sys) = p_sys->oc->nb_streams;
+ if( p_input->p_fmt->i_cat != VIDEO_ES && p_input->p_fmt->i_cat != AUDIO_ES)
+ {
+ msg_Warn( p_mux, "Unhandled ES category" );
+ return VLC_EGENERIC;
+ }
+
stream = av_new_stream( p_sys->oc, p_sys->oc->nb_streams);
if( !stream )
{
codec->time_base.num = p_input->p_fmt->video.i_frame_rate_base;
break;
- default:
- msg_Warn( p_mux, "Unhandled ES category" );
}
codec->bit_rate = p_input->p_fmt->i_bitrate;