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
02fa5295
Commit
02fa5295
authored
Oct 30, 2011
by
Vladimir Voroshilov
Committed by
Michael Niedermayer
Oct 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecated warnings in .bit (de)muxer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ab9c00b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
bit.c
libavformat/bit.c
+9
-9
No files found.
libavformat/bit.c
View file @
02fa5295
...
...
@@ -50,7 +50,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
{
AVStream
*
st
;
st
=
av
_new_stream
(
s
,
0
);
st
=
av
format_new_stream
(
s
,
NULL
);
if
(
!
st
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -67,7 +67,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
static
int
read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
Byte
IOContext
*
pb
=
s
->
pb
;
AV
IOContext
*
pb
=
s
->
pb
;
PutBitContext
pbo
;
uint16_t
buf
[
8
*
MAX_FRAME_SIZE
+
2
];
int
packet_size
;
...
...
@@ -78,12 +78,12 @@ static int read_packet(AVFormatContext *s,
if
(
url_feof
(
pb
))
return
AVERROR_EOF
;
get_le
16
(
pb
);
// sync word
packet_size
=
get_le
16
(
pb
)
/
8
;
avio_rl
16
(
pb
);
// sync word
packet_size
=
avio_rl
16
(
pb
)
/
8
;
if
(
packet_size
>
MAX_FRAME_SIZE
)
return
AVERROR_INVALIDDATA
;
ret
=
get_buffer
(
pb
,
(
uint8_t
*
)
buf
,
(
8
*
packet_size
)
*
sizeof
(
uint16_t
));
ret
=
avio_read
(
pb
,
(
uint8_t
*
)
buf
,
(
8
*
packet_size
)
*
sizeof
(
uint16_t
));
if
(
ret
<
0
)
return
ret
;
if
(
ret
!=
8
*
packet_size
*
sizeof
(
uint16_t
))
...
...
@@ -131,13 +131,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
GetBitContext
gb
;
int
i
;
put_le
16
(
pb
,
SYNC_WORD
);
put_le
16
(
pb
,
8
*
10
);
avio_wl
16
(
pb
,
SYNC_WORD
);
avio_wl
16
(
pb
,
8
*
10
);
init_get_bits
(
&
gb
,
pkt
->
data
,
8
*
10
);
for
(
i
=
0
;
i
<
8
*
10
;
i
++
)
put_le
16
(
pb
,
get_bits1
(
&
gb
)
?
BIT_1
:
BIT_0
);
put_flush_packet
(
pb
);
avio_wl
16
(
pb
,
get_bits1
(
&
gb
)
?
BIT_1
:
BIT_0
);
avio_flush
(
pb
);
return
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