aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-23 03:25:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-25 02:03:08 +0100
commit6aa50374bf27f5a7cbb023e64699a26ea619cf88 (patch)
tree112033c500af70529b66644979d85643781bcb23 /libavformat
parent3cfa310c5de526dbc40d7b33eb6234cff29d8f8c (diff)
downloadffmpeg-6aa50374bf27f5a7cbb023e64699a26ea619cf88.tar.gz
avformat/nut: store version in the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/nut.h1
-rw-r--r--libavformat/nutdec.c1
-rw-r--r--libavformat/nutenc.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/nut.h b/libavformat/nut.h
index da456ac5b0..88b24e5376 100644
--- a/libavformat/nut.h
+++ b/libavformat/nut.h
@@ -104,6 +104,7 @@ typedef struct NUTContext {
int sp_count;
int64_t max_pts;
AVRational *max_pts_tb;
+ int version;
} NUTContext;
extern const AVCodecTag ff_nut_subtitle_tags[];
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index aa7ca676fb..26c6f0d3b0 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -232,6 +232,7 @@ static int decode_main_header(NUTContext *nut)
tmp);
return AVERROR(ENOSYS);
}
+ nut->version = tmp;
GET_V(stream_count, tmp > 0 && tmp <= NUT_MAX_STREAMS);
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index f2172fbf8b..bee1fbe8c2 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -337,7 +337,7 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc)
tmp_head_idx;
int64_t tmp_match;
- ff_put_v(bc, NUT_VERSION);
+ ff_put_v(bc, nut->version = NUT_VERSION);
ff_put_v(bc, nut->avf->nb_streams);
ff_put_v(bc, nut->max_distance);
ff_put_v(bc, nut->time_base_count);