vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Jul  6 
16:22:21 2017 +0200| [38733d0685e7d5e7d9bc4ce604a16a9b43fd4ba3] | committer: 
Francois Cartegnie

packetizer: mpeg4audio: handle WAVE_FORMAT_MPEG_LOAS from mkv (fix #18495)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=38733d0685e7d5e7d9bc4ce604a16a9b43fd4ba3
---

 modules/packetizer/mpeg4audio.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index 608481a5dc..88670e3a60 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -837,7 +837,15 @@ static int LOASParse(decoder_t *p_dec, uint8_t *p_buffer, 
int i_buffer)
 
     /* Wait for the configuration */
     if (!p_sys->b_latm_cfg)
-        return 0;
+    {
+        /* WAVE_FORMAT_MPEG_LOAS, configuration provided as AAC header :/ */
+        if( p_dec->fmt_in.i_extra > 0 &&
+            p_sys->i_channels && p_sys->i_rate && p_sys->i_frame_length )
+        {
+            p_sys->b_latm_cfg = true;
+        }
+        else return 0;
+    }
 
     /* FIXME do we need to split the subframe into independent packet ? */
     if (p_sys->latm.i_sub_frames > 1)

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to