bool b_can_seek;
/* Init Probe data */
- pd.filename = p_demux->psz_path;
+ pd.filename = p_demux->psz_file;
if( ( pd.buf_size = stream_Peek( p_demux->s, &pd.buf, 2048 + 213 ) ) <= 0 )
{
msg_Warn( p_demux, "cannot peek" );
{
int i_len;
- if( !p_demux->psz_path ) return VLC_EGENERIC;
+ if( !p_demux->psz_file ) return VLC_EGENERIC;
- i_len = strlen( p_demux->psz_path );
+ i_len = strlen( p_demux->psz_file );
if( i_len < 4 ) return VLC_EGENERIC;
- if( strcasecmp( &p_demux->psz_path[i_len - 4], ".str" ) &&
- strcasecmp( &p_demux->psz_path[i_len - 4], ".xai" ) &&
- strcasecmp( &p_demux->psz_path[i_len - 3], ".xa" ) )
+ if( strcasecmp( &p_demux->psz_file[i_len - 4], ".str" ) &&
+ strcasecmp( &p_demux->psz_file[i_len - 4], ".xai" ) &&
+ strcasecmp( &p_demux->psz_file[i_len - 3], ".xa" ) )
{
return VLC_EGENERIC;
}
/* Open it */
- if( av_open_input_stream( &p_sys->ic, &p_sys->io, p_demux->psz_path,
+ if( av_open_input_stream( &p_sys->ic, &p_sys->io, p_demux->psz_file,
p_sys->fmt, NULL ) )
{
msg_Err( p_demux, "av_open_input_stream failed" );
else
fmt.i_codec = fmt.video.i_chroma;
}
+ /* We need this for the h264 packetizer */
+ else if( cc->codec_id == CODEC_ID_H264 && ( !strcmp( p_sys->fmt->name, "flv" ) ||
+ !strcmp( p_sys->fmt->name, "matroska" ) || !strcmp( p_sys->fmt->name, "mp4" ) ) )
+ fmt.i_original_fourcc = VLC_FOURCC( 'a', 'v', 'c', '1' );
fmt.video.i_width = cc->width;
fmt.video.i_height = cc->height;