diff mbox series

[FFmpeg-devel,090/281] lxfdec: convert to new channel layout API

Message ID 20220113015612.448-2-jamrial@gmail.com
State New
Headers show
Series New channel layout API | expand

Commit Message

James Almer Jan. 13, 2022, 1:55 a.m. UTC
From: Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/lxfdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tomas Härdin Jan. 27, 2022, 3:19 p.m. UTC | #1
ons 2022-01-12 klockan 22:55 -0300 skrev James Almer:
> From: Vittorio Giovara <vittorio.giovara@gmail.com>
> 
> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libavformat/lxfdec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
> index 7889abb2c9..9e0d265f6a 100644
> --- a/libavformat/lxfdec.c
> +++ b/libavformat/lxfdec.c
> @@ -281,7 +281,8 @@ static int lxf_read_header(AVFormatContext *s)
>  
>          st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
>          st->codecpar->sample_rate = LXF_SAMPLERATE;
> -        st->codecpar->channels    = lxf->channels;
> +        st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
> +        st->codecpar->ch_layout.nb_channels = lxf->channels;
>  
>          avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
>      }

Looks OK

/Tomas
diff mbox series

Patch

diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 7889abb2c9..9e0d265f6a 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -281,7 +281,8 @@  static int lxf_read_header(AVFormatContext *s)
 
         st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
         st->codecpar->sample_rate = LXF_SAMPLERATE;
-        st->codecpar->channels    = lxf->channels;
+        st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+        st->codecpar->ch_layout.nb_channels = lxf->channels;
 
         avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
     }