File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,14 @@ pub unsafe extern fn mp4parse_get_track_audio_info(parser: *mut mp4parse_parser,
448
448
( * info) . sample_rate = rate;
449
449
}
450
450
}
451
- AudioCodecSpecific :: FLACSpecificBox ( _) => {
452
- return MP4PARSE_ERROR_UNSUPPORTED ;
451
+ AudioCodecSpecific :: FLACSpecificBox ( ref flac) => {
452
+ // Return the STREAMINFO metadata block in the codec_specific.
453
+ let streaminfo = & flac. blocks [ 0 ] . data ;
454
+ if streaminfo. len ( ) > std:: u32:: MAX as usize {
455
+ return MP4PARSE_ERROR_INVALID ;
456
+ }
457
+ ( * info) . codec_specific_config . length = streaminfo. len ( ) as u32 ;
458
+ ( * info) . codec_specific_config . data = streaminfo. as_ptr ( ) ;
453
459
}
454
460
AudioCodecSpecific :: OpusSpecificBox ( ref opus) => {
455
461
let mut v = Vec :: new ( ) ;
You can’t perform that action at this time.
0 commit comments