#include <vlc_block.h>
#include <assert.h>
-#include <vlc_codecs.h>
#include "pes.h"
#include "bits.h"
int b_mpeg2, int b_data_alignment, int i_header_size,
int i_max_pes_size )
{
+ VLC_UNUSED(p_sout);
block_t *p_pes;
mtime_t i_pts, i_dts, i_length;
i_max_pes_size = PES_PAYLOAD_SIZE_MAX;
}
- if( p_fmt->i_codec == VLC_CODEC_MP4V &&
+ if( ( p_fmt->i_codec == VLC_CODEC_MP4V ||
+ p_fmt->i_codec == VLC_CODEC_H264 ) &&
p_es->i_flags & BLOCK_FLAG_TYPE_I )
{
- /* For MPEG4 video, add VOL before I-frames */
+ /* For MPEG4 video, add VOL before I-frames,
+ for H264 add SPS/PPS before keyframes*/
p_es = block_Realloc( p_es, p_fmt->i_extra, p_es->i_buffer );
memcpy( p_es->p_buffer, p_fmt->p_extra, p_fmt->i_extra );