diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-04-07 18:08:41 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:39 -0300 |
commit | 548aeb93834b8425c86d1ce60fddc1d41805724d (patch) | |
tree | 0e6f61649b3a70f407e225d247ba5ef0fe812a48 /libavcodec/pthread_frame.c | |
parent | b6746b74621798d9b6697cd7369ee41625b375df (diff) | |
download | ffmpeg-548aeb93834b8425c86d1ce60fddc1d41805724d.tar.gz |
lavc: switch to the new channel layout API
Since the request_channel_layout is used only by a handful of codecs,
move the option to codec private contexts.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/pthread_frame.c')
-rw-r--r-- | libavcodec/pthread_frame.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 33b5a2e628..ddf2460534 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -294,10 +294,18 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, dst->hwaccel = src->hwaccel; dst->hwaccel_context = src->hwaccel_context; - dst->channels = src->channels; dst->sample_rate = src->sample_rate; dst->sample_fmt = src->sample_fmt; +#if FF_API_OLD_CHANNEL_LAYOUT +FF_DISABLE_DEPRECATION_WARNINGS + dst->channels = src->channels; dst->channel_layout = src->channel_layout; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + err = av_channel_layout_copy(&dst->ch_layout, &src->ch_layout); + if (err < 0) + return err; + dst->internal->hwaccel_priv_data = src->internal->hwaccel_priv_data; if (!!dst->hw_frames_ctx != !!src->hw_frames_ctx || |