Commit 8e0fdb03 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/ipmovie: Parse&handle late audio init

Fixes Ticket117

Based on problem description by Kostya
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e0115383
......@@ -78,7 +78,7 @@
#define PALETTE_COUNT 256
typedef struct IPMVEContext {
AVFormatContext *avf;
unsigned char *buf;
int buf_size;
......@@ -541,6 +541,9 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
}
}
if (s->avf->nb_streams == 1 && s->audio_type)
init_audio(s->avf);
/* make a note of where the stream is sitting */
s->next_chunk_offset = avio_tell(pb);
......@@ -576,6 +579,8 @@ static int ipmovie_read_header(AVFormatContext *s)
int chunk_type, i;
uint8_t signature_buffer[sizeof(signature)];
ipmovie->avf = s;
avio_read(pb, signature_buffer, sizeof(signature_buffer));
while (memcmp(signature_buffer, signature, sizeof(signature))) {
memmove(signature_buffer, signature_buffer + 1, sizeof(signature_buffer) - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment