Commit 590d9d61 authored by Vittorio Giovara's avatar Vittorio Giovara Committed by James Almer

dv: convert to new channel layout API

Signed-off-by: 's avatarVittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 84f957e6
...@@ -281,8 +281,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame) ...@@ -281,8 +281,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame)
c->audio_pkt[i].pos = -1; c->audio_pkt[i].pos = -1;
} }
c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq]; c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq];
c->ast[i]->codecpar->channels = 2; c->ast[i]->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
c->ast[i]->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16; c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16;
c->ast[i]->start_time = 0; c->ast[i]->start_time = 0;
} }
......
...@@ -333,7 +333,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) ...@@ -333,7 +333,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
if (c->n_ast > 1) return NULL; if (c->n_ast > 1) return NULL;
/* Some checks -- DV format is very picky about its incoming streams */ /* Some checks -- DV format is very picky about its incoming streams */
if(st->codecpar->codec_id != AV_CODEC_ID_PCM_S16LE || if(st->codecpar->codec_id != AV_CODEC_ID_PCM_S16LE ||
st->codecpar->channels != 2) st->codecpar->ch_layout.nb_channels != 2)
goto bail_out; goto bail_out;
if (st->codecpar->sample_rate != 48000 && if (st->codecpar->sample_rate != 48000 &&
st->codecpar->sample_rate != 44100 && st->codecpar->sample_rate != 44100 &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment