[FFmpeg-cvslog] avformat/nut: add minor_version field with version>=4
Michael Niedermayer
git at videolan.org
Wed Dec 25 02:43:55 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 03:25:25 2013 +0100| [804ea14b3564be53487d490c7f9f02c039542832] | committer: Michael Niedermayer
avformat/nut: add minor_version field with version>=4
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=804ea14b3564be53487d490c7f9f02c039542832
---
libavformat/nut.h | 1 +
libavformat/nutdec.c | 2 ++
libavformat/nutenc.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/libavformat/nut.h b/libavformat/nut.h
index 88b24e5..18b688a 100644
--- a/libavformat/nut.h
+++ b/libavformat/nut.h
@@ -105,6 +105,7 @@ typedef struct NUTContext {
int64_t max_pts;
AVRational *max_pts_tb;
int version;
+ int minor_version;
} NUTContext;
extern const AVCodecTag ff_nut_subtitle_tags[];
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 26c6f0d..4ee5f4d 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -233,6 +233,8 @@ static int decode_main_header(NUTContext *nut)
return AVERROR(ENOSYS);
}
nut->version = tmp;
+ if (nut->version > 3)
+ nut->minor_version = ffio_read_varlen(bc);
GET_V(stream_count, tmp > 0 && tmp <= NUT_MAX_STREAMS);
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index bee1fbe..107e57b 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -338,6 +338,8 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc)
int64_t tmp_match;
ff_put_v(bc, nut->version = NUT_VERSION);
+ if (nut->version > 3)
+ ff_put_v(bc, nut->minor_version);
ff_put_v(bc, nut->avf->nb_streams);
ff_put_v(bc, nut->max_distance);
ff_put_v(bc, nut->time_base_count);
More information about the ffmpeg-cvslog
mailing list