History

wc3movie: convert to new channel layout API

Vittorio Giovara committed 9 years ago

Commit 36fc3e91 parent 95a3f131 file · +3 −5Browse files

Showing the changes to libavformat (1 of 1 file). Show all

Unified · Split

libavformat/wc3movie.c+3−5
@@ -54,7 +54,6 @@ · 53 unmodified lines
54 54
55/* always use the same PCM audio parameters */55/* always use the same PCM audio parameters */
56#define WC3_SAMPLE_RATE 2205056#define WC3_SAMPLE_RATE 22050
57#define WC3_AUDIO_CHANNELS 1
58#define WC3_AUDIO_BITS 1657#define WC3_AUDIO_BITS 16
59 58
60/* nice, constant framerate */59/* nice, constant framerate */
@@ -195,13 +194,12 @@ static int wc3_read_header(AVFormatContext *s) · 134 unmodified lines
195 st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;194 st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
196 st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;195 st->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
197 st->codecpar->codec_tag = 1;196 st->codecpar->codec_tag = 1;
198 st->codecpar->channels = WC3_AUDIO_CHANNELS;197 st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
199 st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
200 st->codecpar->bits_per_coded_sample = WC3_AUDIO_BITS;198 st->codecpar->bits_per_coded_sample = WC3_AUDIO_BITS;
201 st->codecpar->sample_rate = WC3_SAMPLE_RATE;199 st->codecpar->sample_rate = WC3_SAMPLE_RATE;
202 st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *200 st->codecpar->bit_rate = st->codecpar->ch_layout.nb_channels * st->codecpar->sample_rate *
203 st->codecpar->bits_per_coded_sample;201 st->codecpar->bits_per_coded_sample;
204 st->codecpar->block_align = WC3_AUDIO_BITS * WC3_AUDIO_CHANNELS;202 st->codecpar->block_align = WC3_AUDIO_BITS * st->codecpar->ch_layout.nb_channels;
205 203
206 return 0;204 return 0;
207}205}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t