History

swf: convert to new channel layout API

Vittorio Giovara committed 9 years ago

Commit 9ff843e1 parent d38166a2 files · +2 −8Browse files

Showing the changes to libavformat (2 of 2 files). Show all

Unified · Split

2 files
  1. libavformat/swfdec.c +1 −7
  2. libavformat/swfenc.c +1 −1
libavformat/swfdec.c+1−7
@@ -195,13 +195,7 @@ static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info) · 194 unmodified lines
195 if (!ast)195 if (!ast)
196 return NULL;196 return NULL;
197 ast->id = id;197 ast->id = id;
198 if (info & 1) {198 av_channel_layout_default(&ast->codecpar->ch_layout, 1 + (info & 1));
199 ast->codecpar->channels = 2;
200 ast->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
201 } else {
202 ast->codecpar->channels = 1;
203 ast->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
204 }
205 ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;199 ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
206 ast->codecpar->codec_id = ff_codec_get_id(swf_audio_codec_tags, info>>4 & 15);200 ast->codecpar->codec_id = ff_codec_get_id(swf_audio_codec_tags, info>>4 & 15);
207 ffstream(ast)->need_parsing = AVSTREAM_PARSE_FULL;201 ffstream(ast)->need_parsing = AVSTREAM_PARSE_FULL;
libavformat/swfenc.c+1−1
@@ -348,7 +348,7 @@ static int swf_write_header(AVFormatContext *s) · 347 unmodified lines
348 return -1;348 return -1;
349 }349 }
350 v |= 0x02; /* 16 bit playback */350 v |= 0x02; /* 16 bit playback */
351 if (swf->audio_par->channels == 2)351 if (swf->audio_par->ch_layout.nb_channels == 2)
352 v |= 0x01; /* stereo playback */352 v |= 0x01; /* stereo playback */
353 avio_w8(s->pb, v);353 avio_w8(s->pb, v);
354 v |= 0x20; /* mp3 compressed */354 v |= 0x20; /* mp3 compressed */

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