Skip to content
Snippets Groups Projects
Commit dc13d0b5 authored by Baptiste Coudurier's avatar Baptiste Coudurier
Browse files

seems safer to set pts timebase to sample rate, fix some mp3

Originally committed as revision 8300 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b912ef3f
No related branches found
No related tags found
No related merge requests found
...@@ -679,7 +679,6 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -679,7 +679,6 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
v = get_byte(pb); v = get_byte(pb);
swf->samples_per_frame = get_le16(pb); swf->samples_per_frame = get_le16(pb);
ast = av_new_stream(s, -1); /* -1 to avoid clash with video stream ch_id */ ast = av_new_stream(s, -1); /* -1 to avoid clash with video stream ch_id */
av_set_pts_info(ast, 64, 256, swf->frame_rate); /* XXX same as video stream */
swf->audio_stream_index = ast->index; swf->audio_stream_index = ast->index;
ast->codec->channels = 1 + (v&1); ast->codec->channels = 1 + (v&1);
ast->codec->codec_type = CODEC_TYPE_AUDIO; ast->codec->codec_type = CODEC_TYPE_AUDIO;
...@@ -689,6 +688,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -689,6 +688,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
if (!sample_rate_code) if (!sample_rate_code)
return AVERROR_IO; return AVERROR_IO;
ast->codec->sample_rate = 11025 << (sample_rate_code-1); ast->codec->sample_rate = 11025 << (sample_rate_code-1);
av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
if (len > 4) if (len > 4)
url_fskip(pb,len-4); url_fskip(pb,len-4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment