Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
46c19173
Commit
46c19173
authored
May 04, 2013
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nut: use a define for the nut version
Ease switching version in the future and make evident why that value.
parent
2d5fd788
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
nut.h
libavformat/nut.h
+2
-0
nutdec.c
libavformat/nutdec.c
+1
-1
nutenc.c
libavformat/nutenc.c
+1
-1
No files found.
libavformat/nut.h
View file @
46c19173
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
#define MAX_DISTANCE (1024*32-1)
#define MAX_DISTANCE (1024*32-1)
#define NUT_VERSION 3
typedef
enum
{
typedef
enum
{
FLAG_KEY
=
1
,
///<if set, frame is keyframe
FLAG_KEY
=
1
,
///<if set, frame is keyframe
FLAG_EOR
=
2
,
///<if set, stream has no relevance on presentation. (EOR)
FLAG_EOR
=
2
,
///<if set, stream has no relevance on presentation. (EOR)
...
...
libavformat/nutdec.c
View file @
46c19173
...
@@ -213,7 +213,7 @@ static int decode_main_header(NUTContext *nut)
...
@@ -213,7 +213,7 @@ static int decode_main_header(NUTContext *nut)
end
=
get_packetheader
(
nut
,
bc
,
1
,
MAIN_STARTCODE
);
end
=
get_packetheader
(
nut
,
bc
,
1
,
MAIN_STARTCODE
);
end
+=
avio_tell
(
bc
);
end
+=
avio_tell
(
bc
);
GET_V
(
tmp
,
tmp
>=
2
&&
tmp
<=
3
);
GET_V
(
tmp
,
tmp
>=
2
&&
tmp
<=
NUT_VERSION
);
GET_V
(
stream_count
,
tmp
>
0
&&
tmp
<=
NUT_MAX_STREAMS
);
GET_V
(
stream_count
,
tmp
>
0
&&
tmp
<=
NUT_MAX_STREAMS
);
nut
->
max_distance
=
ffio_read_varlen
(
bc
);
nut
->
max_distance
=
ffio_read_varlen
(
bc
);
...
...
libavformat/nutenc.c
View file @
46c19173
...
@@ -323,7 +323,7 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc)
...
@@ -323,7 +323,7 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc)
tmp_head_idx
;
tmp_head_idx
;
int64_t
tmp_match
;
int64_t
tmp_match
;
ff_put_v
(
bc
,
3
);
/* version */
ff_put_v
(
bc
,
NUT_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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment