diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-02 00:41:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-02 01:09:12 +0200 |
commit | e3fb5bc1472c600af628df10e1472a4319781640 (patch) | |
tree | 9ea388e8d0c0c1ed40625105de17ef607b0e9c67 /libavformat/nutenc.c | |
parent | 4eb0f5f635462562275200ecb6b4e1b718fcae37 (diff) | |
download | ffmpeg-e3fb5bc1472c600af628df10e1472a4319781640.tar.gz |
nut: store and read the r_frame_rate
With this, when we use a finer timebase than neccessary to store
durations the demuxer still knows what the original timebase was.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 955a6fb5fa..5133adee08 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -485,6 +485,11 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){ if (st->disposition & ff_nut_dispositions[i].flag) count += add_info(dyn_bc, "Disposition", ff_nut_dispositions[i].str); } + 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); + count += add_info(dyn_bc, "r_frame_rate", buf); + } dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf); if (count) { |