Browse Source

refine avformat/flvdec set bit_rate

tags/n3.3
Steven Liu 8 years ago
parent
commit
af7d0ad983
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/flvdec.c

+ 2
- 1
libavformat/flvdec.c View File

@@ -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…
Cancel
Save