Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From ea308a1f753642001b38d8e9c6928445a68e3baf Mon Sep 17 00:00:00 2001
- From: Hendrik Leppkes <h.leppkes@gmail.com>
- Date: Wed, 16 Mar 2016 12:39:19 +0100
- Subject: [PATCH] matroskaenc: set the actual bit depth in the header
- ---
- libavformat/matroskaenc.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
- diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
- index 05b1b94..6ad9aed 100644
- --- a/libavformat/matroskaenc.c
- +++ b/libavformat/matroskaenc.c
- @@ -850,8 +850,12 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
- return 0;
- }
- - if (!bit_depth && codec->codec_id != AV_CODEC_ID_ADPCM_G726)
- - bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;
- + if (!bit_depth && codec->codec_id != AV_CODEC_ID_ADPCM_G726) {
- + if (codec->bits_per_raw_sample)
- + bit_depth = codec->bits_per_raw_sample;
- + else
- + bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;
- + }
- if (!bit_depth)
- bit_depth = codec->bits_per_coded_sample;
- --
- 2.7.2.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement