Commit 2e89aaf2 authored by bcoudurier's avatar bcoudurier

always export audiostreams

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7454 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9b07c511
...@@ -811,17 +811,13 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -811,17 +811,13 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_byte(pb); get_byte(pb);
v = get_byte(pb); v = get_byte(pb);
swf->samples_per_frame = get_le16(pb); swf->samples_per_frame = get_le16(pb);
if (len > 4)
url_fskip(pb,len-4);
/* if mp3 streaming found, OK */
if ((v & 0x20) != 0) {
ast = av_new_stream(s, 1); ast = av_new_stream(s, 1);
if (!ast)
return -ENOMEM;
av_set_pts_info(ast, 24, 1, 1000); /* 24 bit pts in ms */ av_set_pts_info(ast, 24, 1, 1000); /* 24 bit pts in ms */
ast->codec->channels = 1 + (v&1); ast->codec->channels = 1 + (v&1);
ast->codec->codec_type = CODEC_TYPE_AUDIO;
if (v & 0x20)
ast->codec->codec_id = CODEC_ID_MP3;
ast->need_parsing = 1;
switch((v>> 2) & 0x03) { switch((v>> 2) & 0x03) {
case 1: case 1:
ast->codec->sample_rate = 11025; ast->codec->sample_rate = 11025;
...@@ -833,13 +829,12 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -833,13 +829,12 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast->codec->sample_rate = 44100; ast->codec->sample_rate = 44100;
break; break;
default: default:
av_free(ast);
return AVERROR_IO; return AVERROR_IO;
} }
ast->codec->codec_type = CODEC_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_MP3; if (len > 4)
ast->need_parsing = 1; url_fskip(pb,len-4);
}
} else { } else {
url_fskip(pb, len); url_fskip(pb, len);
} }
......
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