Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4efd5cf3
Commit
4efd5cf3
authored
Jan 21, 2011
by
Anton Khirnov
Committed by
Mans Rullgard
Jan 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: add av_put_str and deprecate put_strz in favor of it
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
1c189fc5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
6 deletions
+27
-6
avienc.c
libavformat/avienc.c
+1
-1
avio.h
libavformat/avio.h
+9
-1
aviobuf.c
libavformat/aviobuf.c
+13
-3
ffmenc.c
libavformat/ffmenc.c
+1
-1
version.h
libavformat/version.h
+3
-0
No files found.
libavformat/avienc.c
View file @
4efd5cf3
...
...
@@ -109,7 +109,7 @@ static void avi_write_info_tag(ByteIOContext *pb, const char *tag, const char *s
len
++
;
put_tag
(
pb
,
tag
);
put_le32
(
pb
,
len
);
put_strz
(
pb
,
str
);
avio_put_str
(
pb
,
str
);
if
(
len
&
1
)
put_byte
(
pb
,
0
);
}
...
...
libavformat/avio.h
View file @
4efd5cf3
...
...
@@ -367,7 +367,15 @@ void put_le16(ByteIOContext *s, unsigned int val);
void
put_be16
(
ByteIOContext
*
s
,
unsigned
int
val
);
void
put_tag
(
ByteIOContext
*
s
,
const
char
*
tag
);
void
put_strz
(
ByteIOContext
*
s
,
const
char
*
buf
);
#if FF_API_OLD_AVIO
attribute_deprecated
void
put_strz
(
ByteIOContext
*
s
,
const
char
*
buf
);
#endif
/**
* Write a NULL-terminated string.
* @return number of bytes written.
*/
int
avio_put_str
(
ByteIOContext
*
s
,
const
char
*
str
);
/**
* fseek() equivalent for ByteIOContext.
...
...
libavformat/aviobuf.c
View file @
4efd5cf3
...
...
@@ -265,12 +265,22 @@ void put_be32(ByteIOContext *s, unsigned int val)
put_byte
(
s
,
val
);
}
#if FF_API_OLD_AVIO
void
put_strz
(
ByteIOContext
*
s
,
const
char
*
str
)
{
if
(
str
)
put_buffer
(
s
,
(
const
unsigned
char
*
)
str
,
strlen
(
str
)
+
1
);
else
avio_put_str
(
s
,
str
);
}
#endif
int
avio_put_str
(
ByteIOContext
*
s
,
const
char
*
str
)
{
int
len
=
1
;
if
(
str
)
{
len
+=
strlen
(
str
);
put_buffer
(
s
,
(
const
unsigned
char
*
)
str
,
len
);
}
else
put_byte
(
s
,
0
);
return
len
;
}
int
ff_get_v_length
(
uint64_t
val
){
...
...
libavformat/ffmenc.c
View file @
4efd5cf3
...
...
@@ -132,7 +132,7 @@ static int ffm_write_header(AVFormatContext *s)
put_be16
(
pb
,
(
int
)
(
codec
->
qcompress
*
10000
.
0
));
put_be16
(
pb
,
(
int
)
(
codec
->
qblur
*
10000
.
0
));
put_be32
(
pb
,
codec
->
bit_rate_tolerance
);
put_strz
(
pb
,
codec
->
rc_eq
?
codec
->
rc_eq
:
"tex^qComp"
);
avio_put_str
(
pb
,
codec
->
rc_eq
?
codec
->
rc_eq
:
"tex^qComp"
);
put_be32
(
pb
,
codec
->
rc_max_rate
);
put_be32
(
pb
,
codec
->
rc_min_rate
);
put_be32
(
pb
,
codec
->
rc_buffer_size
);
...
...
libavformat/version.h
View file @
4efd5cf3
...
...
@@ -86,5 +86,8 @@
#ifndef FF_API_SYMVER
#define FF_API_SYMVER (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
#ifndef FF_API_OLD_AVIO
#define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
#endif //AVFORMAT_VERSION_H
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