summaryrefslogtreecommitdiff
path: root/libavformat/nutdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-02 00:41:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-02 01:09:12 +0200
commite3fb5bc1472c600af628df10e1472a4319781640 (patch)
tree9ea388e8d0c0c1ed40625105de17ef607b0e9c67 /libavformat/nutdec.c
parent4eb0f5f635462562275200ecb6b4e1b718fcae37 (diff)
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/nutdec.c')
-rw-r--r--libavformat/nutdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index d6732b289b..d9d115daf8 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -510,6 +510,12 @@ static int decode_info_header(NUTContext *nut)
set_disposition_bits(s, str_value, stream_id_plus1 - 1);
continue;
}
+
+ if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) {
+ sscanf(str_value, "%d/%d", &st->r_frame_rate.num, &st->r_frame_rate.den);
+ continue;
+ }
+
if (metadata && av_strcasecmp(name, "Uses") &&
av_strcasecmp(name, "Depends") && av_strcasecmp(name, "Replaces"))
av_dict_set(metadata, name, str_value, 0);