AVFormatParameters *ap)
{
VmdDemuxContext *vmd = s->priv_data;
- ByteIOContext *pb = &s->pb;
- AVStream *st, *vst;
+ ByteIOContext *pb = s->pb;
+ AVStream *st = NULL, *vst;
unsigned int toc_offset;
unsigned char *raw_frame_table;
int raw_frame_table_size;
continue;
switch(type) {
case 1: /* Audio Chunk */
+ if (!st) break;
/* first audio chunk contains several audio buffers */
if(current_audio_pts){
vmd->frame_table[total_frames].frame_offset = current_offset;
AVPacket *pkt)
{
VmdDemuxContext *vmd = s->priv_data;
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
int ret = 0;
vmd_frame_t *frame;
}
pkt->stream_index = frame->stream_index;
pkt->pts = frame->pts;
- av_log(NULL, AV_LOG_INFO, " dispatching %s frame with %d bytes and pts %"PRId64"\n",
+ av_log(NULL, AV_LOG_DEBUG, " dispatching %s frame with %d bytes and pts %"PRId64"\n",
(frame->frame_record[0] == 0x02) ? "video" : "audio",
frame->frame_size + BYTES_PER_FRAME_RECORD,
pkt->pts);