smjpegenc: convert to new channel layout API

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
release/5.1
Vittorio Giovara 8 years ago committed by James Almer
parent 677fea79b7
commit d371fe97bf
  1. 2
      libavformat/smjpegdec.c
  2. 2
      libavformat/smjpegenc.c

@ -94,7 +94,7 @@ static int smjpeg_read_header(AVFormatContext *s)
ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codecpar->sample_rate = avio_rb16(pb);
ast->codecpar->bits_per_coded_sample = avio_r8(pb);
ast->codecpar->channels = avio_r8(pb);
ast->codecpar->ch_layout.nb_channels = avio_r8(pb);
ast->codecpar->codec_tag = avio_rl32(pb);
ast->codecpar->codec_id = ff_codec_get_id(ff_codec_smjpeg_audio_tags,
ast->codecpar->codec_tag);

@ -68,7 +68,7 @@ static int smjpeg_write_header(AVFormatContext *s)
avio_wb32(pb, 8);
avio_wb16(pb, par->sample_rate);
avio_w8(pb, par->bits_per_coded_sample);
avio_w8(pb, par->channels);
avio_w8(pb, par->ch_layout.nb_channels);
avio_wl32(pb, tag);
avpriv_set_pts_info(st, 32, 1, 1000);
} else if (par->codec_type == AVMEDIA_TYPE_VIDEO) {

Loading…
Cancel
Save