mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-28 17:51:05 +00:00
avformat/utils: Do not overwrite, but use sample_fmt from context
Fixes Ticket 3759 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
218bb8b3f3
commit
6826f16e4a
@ -3753,6 +3753,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
|
|
||||||
/* if no packet was ever seen, update context now for has_codec_parameters */
|
/* if no packet was ever seen, update context now for has_codec_parameters */
|
||||||
if (!st->internal->avctx_inited) {
|
if (!st->internal->avctx_inited) {
|
||||||
|
if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
|
||||||
|
st->codecpar->format == AV_SAMPLE_FMT_NONE)
|
||||||
|
st->codecpar->format = st->internal->avctx->sample_fmt;
|
||||||
ret = avcodec_parameters_to_context(st->internal->avctx, st->codecpar);
|
ret = avcodec_parameters_to_context(st->internal->avctx, st->codecpar);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto find_stream_info_err;
|
goto find_stream_info_err;
|
||||||
|
Loading…
Reference in New Issue
Block a user