summaryrefslogtreecommitdiffstats
path: root/libavformat/ipmovie.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-26 03:41:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-26 03:41:57 +0200
commit8e0fdb03a2f17131c13df3fe9814d34c1fc972af (patch)
tree33e4022d32c6896044906c754691bc2dd8f5133a /libavformat/ipmovie.c
parente011538394519bc430a8b1d81a22eb3e944c3afc (diff)
downloadffmpeg-streaming-8e0fdb03a2f17131c13df3fe9814d34c1fc972af.zip
ffmpeg-streaming-8e0fdb03a2f17131c13df3fe9814d34c1fc972af.tar.gz
avformat/ipmovie: Parse&handle late audio init
Fixes Ticket117 Based on problem description by Kostya Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 367d074..bebe866 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -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);
OpenPOWER on IntegriCloud