Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame
On Sat, Jul 22, 2017 at 10:15 AM, Anton Khirnov wrote: > Quoting Vittorio Giovara (2017-06-29 00:10:49) > > --- > > avtools/avconv.c| 2 +- > > avtools/avconv_filter.c | 2 +- > > avtools/avplay.c| 4 ++-- > > 3 files changed, 4 insertions(+), 4 deletions(-) > > > > Again, seems premature. The switch should be done at the end. If it > needs to be done here, then your compatibility layer is broken. > ok I'll move tools-related changes to the end -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame
Quoting Vittorio Giovara (2017-06-29 00:10:49) > --- > avtools/avconv.c| 2 +- > avtools/avconv_filter.c | 2 +- > avtools/avplay.c| 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > Again, seems premature. The switch should be done at the end. If it needs to be done here, then your compatibility layer is broken. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame
On 7/4/17 6:18 PM, Vittorio Giovara wrote: > On Tue, Jul 4, 2017 at 6:50 AM, Luca Barbato wrote: >> On 6/29/17 12:10 AM, Vittorio Giovara wrote: >>> --- >>> avtools/avconv.c| 2 +- >>> avtools/avconv_filter.c | 2 +- >>> avtools/avplay.c| 4 ++-- >>> 3 files changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/avtools/avconv.c b/avtools/avconv.c >>> index 8dd11bb5fc..42cbfef592 100644 >>> --- a/avtools/avconv.c >>> +++ b/avtools/avconv.c >>> @@ -1209,7 +1209,7 @@ static int ifilter_send_frame(InputFilter *ifilter, >>> AVFrame *frame) >>> switch (ifilter->ist->st->codecpar->codec_type) { >>> case AVMEDIA_TYPE_AUDIO: >>> need_reinit |= ifilter->sample_rate!= frame->sample_rate || >>> - ifilter->channel_layout != frame->channel_layout; >>> + ifilter->channel_layout != frame->ch_layout.u.mask; >>> break; >>> case AVMEDIA_TYPE_VIDEO: >>> need_reinit |= ifilter->width != frame->width || >>> diff --git a/avtools/avconv_filter.c b/avtools/avconv_filter.c >>> index 884478da27..e719c06658 100644 >>> --- a/avtools/avconv_filter.c >>> +++ b/avtools/avconv_filter.c >>> @@ -798,7 +798,7 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, >>> const AVFrame *frame) >>> ifilter->sample_aspect_ratio = frame->sample_aspect_ratio; >>> >>> ifilter->sample_rate = frame->sample_rate; >>> -ifilter->channel_layout = frame->channel_layout; >>> +ifilter->channel_layout = frame->ch_layout.u.mask; >>> >>> if (frame->hw_frames_ctx) { >>> ifilter->hw_frames_ctx = av_buffer_ref(frame->hw_frames_ctx); >>> diff --git a/avtools/avplay.c b/avtools/avplay.c >>> index b6dbc52cf7..6cc63258fc 100644 >>> --- a/avtools/avplay.c >>> +++ b/avtools/avplay.c >>> @@ -1837,11 +1837,11 @@ static int audio_decode_frame(PlayerState *is, >>> double *pts_ptr) >>> is->frame->format, 1); >>> >>> audio_resample = is->frame->format != >>> is->sdl_sample_fmt || >>> - is->frame->channel_layout != >>> is->sdl_channel_layout || >>> + is->frame->ch_layout.u.mask != >>> is->sdl_channel_layout || >>> is->frame->sample_rate!= >>> is->sdl_sample_rate; >>> >>> resample_changed = is->frame->format != >>> is->resample_sample_fmt || >>> - is->frame->channel_layout != >>> is->resample_channel_layout || >>> + is->frame->ch_layout.u.mask != >>> is->resample_channel_layout || >>> is->frame->sample_rate!= >>> is->resample_sample_rate; >>> >>> if ((!is->avr && audio_resample) || resample_changed) { >>> >> >> Doesn't hurt, but might be folded with patch 16. > > patch 16 is for supplementary parts, such as examples or tests, I'd > rather keep the main tools patches separated > As you prefer, I do not have strong opinions about it. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame
On Tue, Jul 4, 2017 at 6:50 AM, Luca Barbato wrote: > On 6/29/17 12:10 AM, Vittorio Giovara wrote: >> --- >> avtools/avconv.c| 2 +- >> avtools/avconv_filter.c | 2 +- >> avtools/avplay.c| 4 ++-- >> 3 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/avtools/avconv.c b/avtools/avconv.c >> index 8dd11bb5fc..42cbfef592 100644 >> --- a/avtools/avconv.c >> +++ b/avtools/avconv.c >> @@ -1209,7 +1209,7 @@ static int ifilter_send_frame(InputFilter *ifilter, >> AVFrame *frame) >> switch (ifilter->ist->st->codecpar->codec_type) { >> case AVMEDIA_TYPE_AUDIO: >> need_reinit |= ifilter->sample_rate!= frame->sample_rate || >> - ifilter->channel_layout != frame->channel_layout; >> + ifilter->channel_layout != frame->ch_layout.u.mask; >> break; >> case AVMEDIA_TYPE_VIDEO: >> need_reinit |= ifilter->width != frame->width || >> diff --git a/avtools/avconv_filter.c b/avtools/avconv_filter.c >> index 884478da27..e719c06658 100644 >> --- a/avtools/avconv_filter.c >> +++ b/avtools/avconv_filter.c >> @@ -798,7 +798,7 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, >> const AVFrame *frame) >> ifilter->sample_aspect_ratio = frame->sample_aspect_ratio; >> >> ifilter->sample_rate = frame->sample_rate; >> -ifilter->channel_layout = frame->channel_layout; >> +ifilter->channel_layout = frame->ch_layout.u.mask; >> >> if (frame->hw_frames_ctx) { >> ifilter->hw_frames_ctx = av_buffer_ref(frame->hw_frames_ctx); >> diff --git a/avtools/avplay.c b/avtools/avplay.c >> index b6dbc52cf7..6cc63258fc 100644 >> --- a/avtools/avplay.c >> +++ b/avtools/avplay.c >> @@ -1837,11 +1837,11 @@ static int audio_decode_frame(PlayerState *is, >> double *pts_ptr) >> is->frame->format, 1); >> >> audio_resample = is->frame->format != >> is->sdl_sample_fmt || >> - is->frame->channel_layout != >> is->sdl_channel_layout || >> + is->frame->ch_layout.u.mask != >> is->sdl_channel_layout || >> is->frame->sample_rate!= >> is->sdl_sample_rate; >> >> resample_changed = is->frame->format != >> is->resample_sample_fmt || >> - is->frame->channel_layout != >> is->resample_channel_layout || >> + is->frame->ch_layout.u.mask != >> is->resample_channel_layout || >> is->frame->sample_rate!= >> is->resample_sample_rate; >> >> if ((!is->avr && audio_resample) || resample_changed) { >> > > Doesn't hurt, but might be folded with patch 16. patch 16 is for supplementary parts, such as examples or tests, I'd rather keep the main tools patches separated -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/25] avtools: Use the new channel layout API in AVFrame
On 6/29/17 12:10 AM, Vittorio Giovara wrote: > --- > avtools/avconv.c| 2 +- > avtools/avconv_filter.c | 2 +- > avtools/avplay.c| 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/avtools/avconv.c b/avtools/avconv.c > index 8dd11bb5fc..42cbfef592 100644 > --- a/avtools/avconv.c > +++ b/avtools/avconv.c > @@ -1209,7 +1209,7 @@ static int ifilter_send_frame(InputFilter *ifilter, > AVFrame *frame) > switch (ifilter->ist->st->codecpar->codec_type) { > case AVMEDIA_TYPE_AUDIO: > need_reinit |= ifilter->sample_rate!= frame->sample_rate || > - ifilter->channel_layout != frame->channel_layout; > + ifilter->channel_layout != frame->ch_layout.u.mask; > break; > case AVMEDIA_TYPE_VIDEO: > need_reinit |= ifilter->width != frame->width || > diff --git a/avtools/avconv_filter.c b/avtools/avconv_filter.c > index 884478da27..e719c06658 100644 > --- a/avtools/avconv_filter.c > +++ b/avtools/avconv_filter.c > @@ -798,7 +798,7 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, > const AVFrame *frame) > ifilter->sample_aspect_ratio = frame->sample_aspect_ratio; > > ifilter->sample_rate = frame->sample_rate; > -ifilter->channel_layout = frame->channel_layout; > +ifilter->channel_layout = frame->ch_layout.u.mask; > > if (frame->hw_frames_ctx) { > ifilter->hw_frames_ctx = av_buffer_ref(frame->hw_frames_ctx); > diff --git a/avtools/avplay.c b/avtools/avplay.c > index b6dbc52cf7..6cc63258fc 100644 > --- a/avtools/avplay.c > +++ b/avtools/avplay.c > @@ -1837,11 +1837,11 @@ static int audio_decode_frame(PlayerState *is, double > *pts_ptr) > is->frame->format, 1); > > audio_resample = is->frame->format != is->sdl_sample_fmt > || > - is->frame->channel_layout != > is->sdl_channel_layout || > + is->frame->ch_layout.u.mask != > is->sdl_channel_layout || > is->frame->sample_rate!= > is->sdl_sample_rate; > > resample_changed = is->frame->format != > is->resample_sample_fmt || > - is->frame->channel_layout != > is->resample_channel_layout || > + is->frame->ch_layout.u.mask != > is->resample_channel_layout || > is->frame->sample_rate!= > is->resample_sample_rate; > > if ((!is->avr && audio_resample) || resample_changed) { > Doesn't hurt, but might be folded with patch 16. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel