[FFmpeg-devel] [PATCH 2/2] tools/uncoded_frame: remove usage of avfilter_link_get_channels()

Nicolas George george at nsup.org
Sat Jan 6 15:20:54 EET 2018


James Almer (2018-01-05):
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  tools/uncoded_frame.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c
> index 3ca2ba4bbe..c044741701 100644
> --- a/tools/uncoded_frame.c
> +++ b/tools/uncoded_frame.c
> @@ -178,7 +178,7 @@ int main(int argc, char **argv)
>              break;
>          case AVMEDIA_TYPE_AUDIO:
>              st->stream->codec->channel_layout = st->link->channel_layout;
> -            st->stream->codec->channels = avfilter_link_get_channels(st->link);
> +            st->stream->codec->channels = st->link->channels;
>              st->stream->codec->sample_rate = st->link->sample_rate;
>              st->stream->codec->sample_fmt = st->link->format;
>              st->stream->codec->codec_id =

Counter-proposal attached. With the evolution of lavfi, AVFilterLink
should have been made private entirely, but it never happened. Still,
the API to do without it exists.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tools-uncoded_frame-use-buffersink-accessors.patch
Type: text/x-diff
Size: 3812 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180106/8bb46de9/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180106/8bb46de9/attachment.sig>


More information about the ffmpeg-devel mailing list