Commit 804ea14b authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/nut: add minor_version field with version>=4

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6aa50374
...@@ -105,6 +105,7 @@ typedef struct NUTContext { ...@@ -105,6 +105,7 @@ typedef struct NUTContext {
int64_t max_pts; int64_t max_pts;
AVRational *max_pts_tb; AVRational *max_pts_tb;
int version; int version;
int minor_version;
} NUTContext; } NUTContext;
extern const AVCodecTag ff_nut_subtitle_tags[]; extern const AVCodecTag ff_nut_subtitle_tags[];
......
...@@ -233,6 +233,8 @@ static int decode_main_header(NUTContext *nut) ...@@ -233,6 +233,8 @@ static int decode_main_header(NUTContext *nut)
return AVERROR(ENOSYS); return AVERROR(ENOSYS);
} }
nut->version = tmp; nut->version = tmp;
if (nut->version > 3)
nut->minor_version = ffio_read_varlen(bc);
GET_V(stream_count, tmp > 0 && tmp <= NUT_MAX_STREAMS); GET_V(stream_count, tmp > 0 && tmp <= NUT_MAX_STREAMS);
......
...@@ -338,6 +338,8 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc) ...@@ -338,6 +338,8 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc)
int64_t tmp_match; int64_t tmp_match;
ff_put_v(bc, nut->version = NUT_VERSION); 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->avf->nb_streams);
ff_put_v(bc, nut->max_distance); ff_put_v(bc, nut->max_distance);
ff_put_v(bc, nut->time_base_count); ff_put_v(bc, nut->time_base_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment