diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-25 22:34:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-25 22:34:21 +0100 |
| commit | f3617efde1751ac9e55f692369dc4ba3c6350ca8 (patch) | |
| tree | 48c17abf1dbadf276229c3aafdcd9b06d155a771 /src/lib/ffmpeg_audio_stream.cc | |
| parent | 0fabbb1680b5042570d50a2276004e2c0e62321c (diff) | |
Show audio bit depth in content properties (#559).
Diffstat (limited to 'src/lib/ffmpeg_audio_stream.cc')
| -rw-r--r-- | src/lib/ffmpeg_audio_stream.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_audio_stream.cc b/src/lib/ffmpeg_audio_stream.cc index 05e1a3fc8..9400eb60d 100644 --- a/src/lib/ffmpeg_audio_stream.cc +++ b/src/lib/ffmpeg_audio_stream.cc @@ -39,7 +39,8 @@ FFmpegAudioStream::FFmpegAudioStream (cxml::ConstNodePtr node, int version) , AudioStream ( node->number_child<int>("FrameRate"), node->optional_number_child<Frame>("Length").get_value_or(0), - AudioMapping (node->node_child("Mapping"), version) + AudioMapping(node->node_child("Mapping"), version), + node->optional_number_child<int>("BitDepth") ) { optional<ContentTime::Type> const f = node->optional_number_child<ContentTime::Type>("FirstAudio"); @@ -63,4 +64,7 @@ FFmpegAudioStream::as_xml (xmlpp::Node* root) const if (codec_name) { root->add_child("CodecName")->add_child_text(codec_name.get()); } + if (bit_depth()) { + root->add_child("BitDepth")->add_child_text(raw_convert<string>(bit_depth().get())); + } } |
