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
e16ead07
Commit
e16ead07
authored
Mar 02, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Mar 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: deprecate get_strz() in favor of avio_get_str
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
41d8555f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
avio.h
libavformat/avio.h
+6
-1
aviobuf.c
libavformat/aviobuf.c
+3
-10
cafdec.c
libavformat/cafdec.c
+2
-2
ffmdec.c
libavformat/ffmdec.c
+2
-1
mov.c
libavformat/mov.c
+1
-1
No files found.
libavformat/avio.h
View file @
e16ead07
...
...
@@ -548,7 +548,12 @@ int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen);
int
avio_get_str16le
(
AVIOContext
*
pb
,
int
maxlen
,
char
*
buf
,
int
buflen
);
int
avio_get_str16be
(
AVIOContext
*
pb
,
int
maxlen
,
char
*
buf
,
int
buflen
);
char
*
get_strz
(
AVIOContext
*
s
,
char
*
buf
,
int
maxlen
);
#if FF_API_OLD_AVIO
/**
* @deprecated use avio_get_str instead
*/
attribute_deprecated
char
*
get_strz
(
AVIOContext
*
s
,
char
*
buf
,
int
maxlen
);
#endif
unsigned
int
avio_rb16
(
AVIOContext
*
s
);
unsigned
int
avio_rb24
(
AVIOContext
*
s
);
unsigned
int
avio_rb32
(
AVIOContext
*
s
);
...
...
libavformat/aviobuf.c
View file @
e16ead07
...
...
@@ -675,20 +675,13 @@ unsigned int avio_rb32(AVIOContext *s)
return
val
;
}
#if FF_API_OLD_AVIO
char
*
get_strz
(
AVIOContext
*
s
,
char
*
buf
,
int
maxlen
)
{
int
i
=
0
;
char
c
;
while
((
c
=
avio_r8
(
s
)))
{
if
(
i
<
maxlen
-
1
)
buf
[
i
++
]
=
c
;
}
buf
[
i
]
=
0
;
/* Ensure null terminated, but may be truncated */
avio_get_str
(
s
,
INT_MAX
,
buf
,
maxlen
);
return
buf
;
}
#endif
int
ff_get_line
(
AVIOContext
*
s
,
char
*
buf
,
int
maxlen
)
{
...
...
libavformat/cafdec.c
View file @
e16ead07
...
...
@@ -185,8 +185,8 @@ static void read_info_chunk(AVFormatContext *s, int64_t size)
for
(
i
=
0
;
i
<
nb_entries
;
i
++
)
{
char
key
[
32
];
char
value
[
1024
];
get_strz
(
pb
,
key
,
sizeof
(
key
));
get_strz
(
pb
,
value
,
sizeof
(
value
));
avio_get_str
(
pb
,
INT_MAX
,
key
,
sizeof
(
key
));
avio_get_str
(
pb
,
INT_MAX
,
value
,
sizeof
(
value
));
av_metadata_set2
(
&
s
->
metadata
,
key
,
value
,
0
);
}
}
...
...
libavformat/ffmdec.c
View file @
e16ead07
...
...
@@ -325,7 +325,8 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec
->
qcompress
=
avio_rb16
(
pb
)
/
10000
.
0
;
codec
->
qblur
=
avio_rb16
(
pb
)
/
10000
.
0
;
codec
->
bit_rate_tolerance
=
avio_rb32
(
pb
);
codec
->
rc_eq
=
av_strdup
(
get_strz
(
pb
,
rc_eq_buf
,
sizeof
(
rc_eq_buf
)));
avio_get_str
(
pb
,
INT_MAX
,
rc_eq_buf
,
sizeof
(
rc_eq_buf
));
codec
->
rc_eq
=
av_strdup
(
rc_eq_buf
);
codec
->
rc_max_rate
=
avio_rb32
(
pb
);
codec
->
rc_min_rate
=
avio_rb32
(
pb
);
codec
->
rc_buffer_size
=
avio_rb32
(
pb
);
...
...
libavformat/mov.c
View file @
e16ead07
...
...
@@ -2331,7 +2331,7 @@ static void mov_read_chapters(AVFormatContext *s)
avio_get_str16le
(
sc
->
pb
,
len
,
title
,
title_len
);
else
{
AV_WB16
(
title
,
ch
);
get_strz
(
sc
->
pb
,
title
+
2
,
len
-
1
);
avio_get_str
(
sc
->
pb
,
len
-
2
,
title
+
2
,
title_len
-
2
);
}
ff_new_chapter
(
s
,
i
,
st
->
time_base
,
sample
->
timestamp
,
end
,
title
);
...
...
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