diff options
author | Diego Biurrun <diego@biurrun.de> | 2017-03-14 16:43:29 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2017-04-03 13:50:00 +0200 |
commit | 604fbb3132e88727e496c96c92cfe02748c25a1a (patch) | |
tree | 2b15eb916a4430e87dc74c03ba47a62c628c4fc2 /libavformat/isom.h | |
parent | 3d197514e613ccd9eab43180c0a7c8b09a307606 (diff) | |
download | ffmpeg-604fbb3132e88727e496c96c92cfe02748c25a1a.tar.gz |
mov: Move code shared with CAF to a separate file
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 8cc5ab744d..2a7486d7ba 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -239,8 +239,21 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb); -enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags); int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries); +/** + * Compute codec id for 'lpcm' tag. + * See CoreAudioTypes and AudioStreamBasicDescription at Apple. + */ +static inline enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags) +{ + /* lpcm flags: + * 0x1 = float + * 0x2 = big-endian + * 0x4 = signed + */ + return ff_get_pcm_codec_id(bps, flags & 1, flags & 2, flags & 4 ? -1 : 0); +} + #endif /* AVFORMAT_ISOM_H */ |