Commit 2830ffc5 authored by conrad's avatar conrad

Use av_get_bits_per_sample


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10323 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a6a73b65
...@@ -366,7 +366,7 @@ static int mkv_write_tracks(AVFormatContext *s) ...@@ -366,7 +366,7 @@ static int mkv_write_tracks(AVFormatContext *s)
AVCodecContext *codec = st->codec; AVCodecContext *codec = st->codec;
offset_t subinfo, track; offset_t subinfo, track;
int native_id = 0; int native_id = 0;
int bit_depth = 0; int bit_depth = av_get_bits_per_sample(codec->codec_id);
track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY); track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY);
put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER , i + 1); put_ebml_uint (pb, MATROSKA_ID_TRACKNUMBER , i + 1);
...@@ -385,19 +385,6 @@ static int mkv_write_tracks(AVFormatContext *s) ...@@ -385,19 +385,6 @@ static int mkv_write_tracks(AVFormatContext *s)
} }
} }
switch (codec->codec_id) {
case CODEC_ID_PCM_S16LE:
case CODEC_ID_PCM_S16BE:
case CODEC_ID_PCM_U16LE:
case CODEC_ID_PCM_U16BE:
bit_depth = 16;
break;
case CODEC_ID_PCM_S8:
case CODEC_ID_PCM_U8:
bit_depth = 8;
break;
}
// XXX: CodecPrivate for vorbis, theora, aac, native mpeg4, ... // XXX: CodecPrivate for vorbis, theora, aac, native mpeg4, ...
if (native_id) { if (native_id) {
if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA) { if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment