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
e5197539
Commit
e5197539
authored
Mar 06, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Mar 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: deprecate url_fgetc and remove all it uses
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
655e45e7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
avio.h
libavformat/avio.h
+2
-4
aviobuf.c
libavformat/aviobuf.c
+6
-4
mpegts.c
libavformat/mpegts.c
+2
-2
oggdec.c
libavformat/oggdec.c
+5
-5
No files found.
libavformat/avio.h
View file @
e5197539
...
@@ -426,6 +426,8 @@ attribute_deprecated int url_fclose(AVIOContext *s);
...
@@ -426,6 +426,8 @@ attribute_deprecated int url_fclose(AVIOContext *s);
attribute_deprecated
int64_t
url_fseek
(
AVIOContext
*
s
,
int64_t
offset
,
int
whence
);
attribute_deprecated
int64_t
url_fseek
(
AVIOContext
*
s
,
int64_t
offset
,
int
whence
);
attribute_deprecated
int
url_fskip
(
AVIOContext
*
s
,
int64_t
offset
);
attribute_deprecated
int
url_fskip
(
AVIOContext
*
s
,
int64_t
offset
);
attribute_deprecated
int64_t
url_ftell
(
AVIOContext
*
s
);
attribute_deprecated
int64_t
url_ftell
(
AVIOContext
*
s
);
#define URL_EOF (-1)
attribute_deprecated
int
url_fgetc
(
AVIOContext
*
s
);
/**
/**
* @}
* @}
*/
*/
...
@@ -503,10 +505,6 @@ int av_url_read_fpause(AVIOContext *h, int pause);
...
@@ -503,10 +505,6 @@ int av_url_read_fpause(AVIOContext *h, int pause);
int64_t
av_url_read_fseek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
av_url_read_fseek
(
AVIOContext
*
h
,
int
stream_index
,
int64_t
timestamp
,
int
flags
);
int64_t
timestamp
,
int
flags
);
#define URL_EOF (-1)
/** @note return URL_EOF (-1) if EOF */
int
url_fgetc
(
AVIOContext
*
s
);
/** @warning currently size is limited */
/** @warning currently size is limited */
#ifdef __GNUC__
#ifdef __GNUC__
int
url_fprintf
(
AVIOContext
*
s
,
const
char
*
fmt
,
...)
__attribute__
((
__format__
(
__printf__
,
2
,
3
)));
int
url_fprintf
(
AVIOContext
*
s
,
const
char
*
fmt
,
...)
__attribute__
((
__format__
(
__printf__
,
2
,
3
)));
...
...
libavformat/aviobuf.c
View file @
e5197539
...
@@ -541,6 +541,7 @@ int avio_r8(AVIOContext *s)
...
@@ -541,6 +541,7 @@ int avio_r8(AVIOContext *s)
return
0
;
return
0
;
}
}
#if FF_API_OLD_AVIO
int
url_fgetc
(
AVIOContext
*
s
)
int
url_fgetc
(
AVIOContext
*
s
)
{
{
if
(
s
->
buf_ptr
>=
s
->
buf_end
)
if
(
s
->
buf_ptr
>=
s
->
buf_end
)
...
@@ -549,6 +550,7 @@ int url_fgetc(AVIOContext *s)
...
@@ -549,6 +550,7 @@ int url_fgetc(AVIOContext *s)
return
*
s
->
buf_ptr
++
;
return
*
s
->
buf_ptr
++
;
return
URL_EOF
;
return
URL_EOF
;
}
}
#endif
int
avio_read
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
)
int
avio_read
(
AVIOContext
*
s
,
unsigned
char
*
buf
,
int
size
)
{
{
...
@@ -921,16 +923,16 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
...
@@ -921,16 +923,16 @@ char *url_fgets(AVIOContext *s, char *buf, int buf_size)
int
c
;
int
c
;
char
*
q
;
char
*
q
;
c
=
url_fgetc
(
s
);
c
=
avio_r8
(
s
);
if
(
c
==
EOF
)
if
(
url_feof
(
s
)
)
return
NULL
;
return
NULL
;
q
=
buf
;
q
=
buf
;
for
(;;)
{
for
(;;)
{
if
(
c
==
EOF
||
c
==
'\n'
)
if
(
url_feof
(
s
)
||
c
==
'\n'
)
break
;
break
;
if
((
q
-
buf
)
<
buf_size
-
1
)
if
((
q
-
buf
)
<
buf_size
-
1
)
*
q
++
=
c
;
*
q
++
=
c
;
c
=
url_fgetc
(
s
);
c
=
avio_r8
(
s
);
}
}
if
(
buf_size
>
0
)
if
(
buf_size
>
0
)
*
q
=
'\0'
;
*
q
=
'\0'
;
...
...
libavformat/mpegts.c
View file @
e5197539
...
@@ -1312,8 +1312,8 @@ static int mpegts_resync(AVFormatContext *s)
...
@@ -1312,8 +1312,8 @@ static int mpegts_resync(AVFormatContext *s)
int
c
,
i
;
int
c
,
i
;
for
(
i
=
0
;
i
<
MAX_RESYNC_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_RESYNC_SIZE
;
i
++
)
{
c
=
url_fgetc
(
pb
);
c
=
avio_r8
(
pb
);
if
(
c
<
0
)
if
(
url_feof
(
pb
)
)
return
-
1
;
return
-
1
;
if
(
c
==
0x47
)
{
if
(
c
==
0x47
)
{
avio_seek
(
pb
,
-
1
,
SEEK_CUR
);
avio_seek
(
pb
,
-
1
,
SEEK_CUR
);
...
...
libavformat/oggdec.c
View file @
e5197539
...
@@ -218,8 +218,8 @@ ogg_read_page (AVFormatContext * s, int *str)
...
@@ -218,8 +218,8 @@ ogg_read_page (AVFormatContext * s, int *str)
sync
[(
sp
+
2
)
&
3
]
==
'g'
&&
sync
[(
sp
+
3
)
&
3
]
==
'S'
)
sync
[(
sp
+
2
)
&
3
]
==
'g'
&&
sync
[(
sp
+
3
)
&
3
]
==
'S'
)
break
;
break
;
c
=
url_fgetc
(
bc
);
c
=
avio_r8
(
bc
);
if
(
c
<
0
)
if
(
url_feof
(
bc
)
)
return
-
1
;
return
-
1
;
sync
[
sp
++
&
3
]
=
c
;
sync
[
sp
++
&
3
]
=
c
;
}
while
(
i
++
<
MAX_PAGE_SIZE
);
}
while
(
i
++
<
MAX_PAGE_SIZE
);
...
@@ -229,15 +229,15 @@ ogg_read_page (AVFormatContext * s, int *str)
...
@@ -229,15 +229,15 @@ ogg_read_page (AVFormatContext * s, int *str)
return
-
1
;
return
-
1
;
}
}
if
(
url_fgetc
(
bc
)
!=
0
)
/* version */
if
(
avio_r8
(
bc
)
!=
0
)
/* version */
return
-
1
;
return
-
1
;
flags
=
url_fgetc
(
bc
);
flags
=
avio_r8
(
bc
);
gp
=
avio_rl64
(
bc
);
gp
=
avio_rl64
(
bc
);
serial
=
avio_rl32
(
bc
);
serial
=
avio_rl32
(
bc
);
seq
=
avio_rl32
(
bc
);
seq
=
avio_rl32
(
bc
);
crc
=
avio_rl32
(
bc
);
crc
=
avio_rl32
(
bc
);
nsegs
=
url_fgetc
(
bc
);
nsegs
=
avio_r8
(
bc
);
idx
=
ogg_find_stream
(
ogg
,
serial
);
idx
=
ogg_find_stream
(
ogg
,
serial
);
if
(
idx
<
0
){
if
(
idx
<
0
){
...
...
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