On Wed, Sep 25, 2013 at 12:36:50PM +0200, Maxim Polijakowski wrote:
> 
> the attached patch adds support for multichannel ATRAC3+ streams to
> the OpenMG demuxer. It also sets the currently wrong ATRAC3+ frame
> size to right one of 2048 samples.
> 
> The patch for ATRAC3+ codec itself is in preparation and will be
> posted shortly...
> 
> Please review and commit.

Please send a proper Git patch that we can push directly.

> --- a/libavformat/omadec.c
> +++ b/libavformat/omadec.c
> @@ -364,7 +364,13 @@ static int oma_read_header(AVFormatContext *s)
>          avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
>          break;
>      case OMA_CODECID_ATRAC3P:
> -        st->codec->channels = (codec_params >> 10) & 7;
> +        channel_id = (codec_params >> 10) & 7;
> +        if (!channel_id) {
> +            av_log(s, AV_LOG_ERROR, "Invalid ATRAC-X channel id: %d\n", 
> channel_id);

Please break this line.

> +        st->codec->channel_layout = ff_oma_chid_to_native_layout[channel_id 
> - 1];
> +        st->codec->channels = ff_oma_chid_to_num_channels[channel_id - 1];

Please vertically align the = while you're at it.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to