diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2016-11-26 11:28:22 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2016-11-26 11:28:22 +0800 |
commit | af7d0ad983a1f049f4d2ef64716cb81ae724d9cc (patch) | |
tree | 2de81d42498947af0587447b9160423657c3715e | |
parent | 7c5478a2035e4c0b6fcf3c597c745669ccb698e0 (diff) | |
download | ffmpeg-af7d0ad983a1f049f4d2ef64716cb81ae724d9cc.tar.gz |
refine avformat/flvdec set bit_rate
-rw-r--r-- | libavformat/flvdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index bf67fe4418..520a3a0034 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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; |