[FFmpeg-cvslog] refine avformat/flvdec set bit_rate

Steven Liu git at videolan.org
Sat Nov 26 05:29:23 EET 2016


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Sat Nov 26 11:28:22 2016 +0800| [af7d0ad983a1f049f4d2ef64716cb81ae724d9cc] | committer: Steven Liu

refine avformat/flvdec set bit_rate

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af7d0ad983a1f049f4d2ef64716cb81ae724d9cc
---

 libavformat/flvdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index bf67fe4..520a3a0 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;



More information about the ffmpeg-cvslog mailing list