mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
ao_lavc: stop using av_get_alt_sample_fmt
Use av_get_planar_sample_fmt instead.
This commit is contained in:
parent
61aef3fff9
commit
925c3af928
@ -219,22 +219,22 @@ out_takefirst:
|
|||||||
ac->planarize = false;
|
ac->planarize = false;
|
||||||
{
|
{
|
||||||
bool found_format = false;
|
bool found_format = false;
|
||||||
bool found_alternate_format = false;
|
bool found_planar_format = false;
|
||||||
for (sampleformat = codec->sample_fmts;
|
for (sampleformat = codec->sample_fmts;
|
||||||
sampleformat && *sampleformat != AV_SAMPLE_FMT_NONE;
|
sampleformat && *sampleformat != AV_SAMPLE_FMT_NONE;
|
||||||
++sampleformat) {
|
++sampleformat) {
|
||||||
if (*sampleformat == ac->stream->codec->sample_fmt)
|
if (*sampleformat == ac->stream->codec->sample_fmt)
|
||||||
found_format = true;
|
found_format = true;
|
||||||
if (*sampleformat ==
|
if (*sampleformat ==
|
||||||
av_get_alt_sample_fmt(ac->stream->codec->sample_fmt, 1))
|
av_get_planar_sample_fmt(ac->stream->codec->sample_fmt))
|
||||||
found_alternate_format = true;
|
found_planar_format = true;
|
||||||
}
|
}
|
||||||
if (!found_format && found_alternate_format) {
|
if (!found_format && found_planar_format) {
|
||||||
ac->stream->codec->sample_fmt =
|
ac->stream->codec->sample_fmt =
|
||||||
av_get_alt_sample_fmt(ac->stream->codec->sample_fmt, 1);
|
av_get_planar_sample_fmt(ac->stream->codec->sample_fmt);
|
||||||
ac->planarize = true;
|
ac->planarize = true;
|
||||||
}
|
}
|
||||||
if (!found_format && !found_alternate_format) {
|
if (!found_format && !found_planar_format) {
|
||||||
// shouldn't happen
|
// shouldn't happen
|
||||||
mp_msg(MSGT_ENCODE, MSGL_ERR,
|
mp_msg(MSGT_ENCODE, MSGL_ERR,
|
||||||
"ao-lavc: sample format not found\n");
|
"ao-lavc: sample format not found\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user