avformat/ipmovie: Parse&handle late audio init
Fixes Ticket117 Based on problem description by Kostya Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e011538394
commit
8e0fdb03a2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user