[FFmpeg-cvslog] avformat/ipmovie: Parse&handle late audio init

Michael Niedermayer git at videolan.org
Sun Jul 26 04:16:54 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 26 03:41:57 2015 +0200| [8e0fdb03a2f17131c13df3fe9814d34c1fc972af] | committer: Michael Niedermayer

avformat/ipmovie: Parse&handle late audio init

Fixes Ticket117

Based on problem description by Kostya
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e0fdb03a2f17131c13df3fe9814d34c1fc972af
---

 libavformat/ipmovie.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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);



More information about the ffmpeg-cvslog mailing list