mirror of
https://github.com/mpv-player/mpv
synced 2024-12-17 20:34:58 +00:00
demux_mkv: do not reset bits_per_coded_sample if not needed
This commit is contained in:
parent
b789acee21
commit
09eaaf3f2c
@ -1530,8 +1530,6 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track)
|
|||||||
if (!strcmp(codec, "mp3")) {
|
if (!strcmp(codec, "mp3")) {
|
||||||
track->parse = true;
|
track->parse = true;
|
||||||
} else if (!strcmp(codec, "flac")) {
|
} else if (!strcmp(codec, "flac")) {
|
||||||
sh_a->bits_per_coded_sample = 0;
|
|
||||||
|
|
||||||
unsigned char *ptr = extradata;
|
unsigned char *ptr = extradata;
|
||||||
unsigned int size = extradata_len;
|
unsigned int size = extradata_len;
|
||||||
if (size < 4 || ptr[0] != 'f' || ptr[1] != 'L' || ptr[2] != 'a'
|
if (size < 4 || ptr[0] != 'f' || ptr[1] != 'L' || ptr[2] != 'a'
|
||||||
@ -1569,11 +1567,6 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track)
|
|||||||
AV_WL32(data + 10, track->a_osfreq);
|
AV_WL32(data + 10, track->a_osfreq);
|
||||||
// Bogus: last frame won't be played.
|
// Bogus: last frame won't be played.
|
||||||
AV_WL32(data + 14, 0);
|
AV_WL32(data + 14, 0);
|
||||||
} else if (!strcmp(codec, "ac3") ||
|
|
||||||
!strcmp(codec, "eac3") ||
|
|
||||||
!strcmp(codec, "dts"))
|
|
||||||
{
|
|
||||||
sh_a->bits_per_coded_sample = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some files have broken default DefaultDuration set, which will lead to
|
// Some files have broken default DefaultDuration set, which will lead to
|
||||||
|
Loading…
Reference in New Issue
Block a user