[vlc-commits] demux: mp4: add Opus codec extra data
Francois Cartegnie
git at videolan.org
Wed Jan 14 20:25:20 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan 14 20:23:42 2015 +0100| [39353b9c31c2f3117d2139acb7ebed370fce0f14] | committer: Francois Cartegnie
demux: mp4: add Opus codec extra data
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39353b9c31c2f3117d2139acb7ebed370fce0f14
---
modules/demux/mp4/essetup.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 3bf5c61..ff98353 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -738,7 +738,21 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
}
break;
}
-
+ case ATOM_Opus:
+ {
+ MP4_Box_t *p_binary = MP4_BoxGet( p_sample, "dOps" );
+ if( p_binary && BOXDATA(p_binary) && BOXDATA(p_binary)->i_blob )
+ {
+ p_track->fmt.p_extra = malloc( BOXDATA(p_binary)->i_blob );
+ if( p_track->fmt.p_extra )
+ {
+ p_track->fmt.i_extra = BOXDATA(p_binary)->i_blob;
+ memcpy( p_track->fmt.p_extra, BOXDATA(p_binary)->p_blob,
+ p_track->fmt.i_extra );
+ }
+ }
+ break;
+ }
default:
msg_Dbg( p_demux, "Unrecognized FourCC %4.4s", (char *)&p_sample->i_type );
break;
More information about the vlc-commits
mailing list