Commit f53c5210 authored by michael's avatar michael

factorze another 2 lines


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6635 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a927c3c7
...@@ -104,10 +104,8 @@ static int amr_read_header(AVFormatContext *s, ...@@ -104,10 +104,8 @@ static int amr_read_header(AVFormatContext *s,
return AVERROR_NOMEM; return AVERROR_NOMEM;
} }
st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b'); st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');
st->codec->codec_id = CODEC_ID_AMR_WB; st->codec->codec_id = CODEC_ID_AMR_WB;
st->codec->channels = 1;
st->codec->sample_rate = 16000; st->codec->sample_rate = 16000;
} }
else else
...@@ -118,12 +116,12 @@ static int amr_read_header(AVFormatContext *s, ...@@ -118,12 +116,12 @@ static int amr_read_header(AVFormatContext *s,
return AVERROR_NOMEM; return AVERROR_NOMEM;
} }
st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r'); st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');
st->codec->codec_id = CODEC_ID_AMR_NB; st->codec->codec_id = CODEC_ID_AMR_NB;
st->codec->channels = 1;
st->codec->sample_rate = 8000; st->codec->sample_rate = 8000;
} }
st->codec->channels = 1;
st->codec->codec_type = CODEC_TYPE_AUDIO;
av_set_pts_info(st, 64, 1, st->codec->sample_rate); av_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0; return 0;
......
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