Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-14 03:12:27 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-12-14 04:12:49 +0300
commit3b537eab27bb34f5f63b06097fbd52ff5941c3f6 (patch)
tree74270267a7a3b23148a23cbf90b1472b57a09609 /libavformat/nutenc.c
parent28a6f970f64c4d5c1326dd68393bedf73cc42e10 (diff)
avformat/nutenc: store the actual r_frame_rate in the corresponding field if available
Fixes Ticket 3629 part3 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 3424e26edb..c335e6455a 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -524,7 +524,10 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id) {
}
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
uint8_t buf[256];
- snprintf(buf, sizeof(buf), "%d/%d", st->codec->time_base.den, st->codec->time_base.num);
+ if (st->r_frame_rate.num>0 && st->r_frame_rate.den>0)
+ snprintf(buf, sizeof(buf), "%d/%d", st->r_frame_rate.num, st->r_frame_rate.den);
+ else
+ snprintf(buf, sizeof(buf), "%d/%d", st->codec->time_base.den, st->codec->time_base.num);
count += add_info(dyn_bc, "r_frame_rate", buf);
}
dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf);