diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 13:26:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 13:30:12 +0200 |
commit | e46cc1dab05e366feaf98efc9bd2d57e2fa58410 (patch) | |
tree | c267da204835358c88066a4f7904213a4e3d89bd | |
parent | a72df4dadc0dd4347e5cd0dc0674f59f16e89c95 (diff) | |
parent | 43e7f0797f9f821a3866a20f05e512e13c82076a (diff) | |
download | ffmpeg-e46cc1dab05e366feaf98efc9bd2d57e2fa58410.tar.gz |
Merge commit '43e7f0797f9f821a3866a20f05e512e13c82076a'
* commit '43e7f0797f9f821a3866a20f05e512e13c82076a':
flvenc: only write the framerate tag based on avg_frame_rate
Conflicts:
tests/ref/lavf/flv_fmt
tests/ref/seek/lavf-flv_fmt
tests/ref/seek/vsynth2-flv
tests/ref/vsynth/vsynth1-flashsv
tests/ref/vsynth/vsynth1-flv
tests/ref/vsynth/vsynth2-flashsv
tests/ref/vsynth/vsynth2-flv
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/flvenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index c16f8ebb4a..1d8af3388d 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -209,8 +209,6 @@ static int flv_write_header(AVFormatContext *s) if (s->streams[i]->avg_frame_rate.den && s->streams[i]->avg_frame_rate.num) { framerate = av_q2d(s->streams[i]->avg_frame_rate); - } else { - framerate = 1 / av_q2d(s->streams[i]->codec->time_base); } if (video_enc) { av_log(s, AV_LOG_ERROR, @@ -317,8 +315,10 @@ static int flv_write_header(AVFormatContext *s) put_amf_string(pb, "videodatarate"); put_amf_double(pb, video_enc->bit_rate / 1024.0); - put_amf_string(pb, "framerate"); - put_amf_double(pb, framerate); + if (framerate != 0.0) { + put_amf_string(pb, "framerate"); + put_amf_double(pb, framerate); + } put_amf_string(pb, "videocodecid"); put_amf_double(pb, video_enc->codec_tag); |