mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
refine avformat/flvdec set bit_rate
This commit is contained in:
parent
7c5478a203
commit
af7d0ad983
@ -143,9 +143,10 @@ static AVStream *create_stream(AVFormatContext *s, int codec_type)
|
||||
&& s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE
|
||||
&& s->streams[1]->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE))
|
||||
s->ctx_flags &= ~AVFMTCTX_NOHEADER;
|
||||
if (codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
if (codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
st->codecpar->bit_rate = flv->audio_bit_rate;
|
||||
flv->missing_streams &= ~FLV_HEADER_FLAG_HASAUDIO;
|
||||
}
|
||||
if (codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
st->codecpar->bit_rate = flv->video_bit_rate;
|
||||
flv->missing_streams &= ~FLV_HEADER_FLAG_HASVIDEO;
|
||||
|
Loading…
Reference in New Issue
Block a user