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
86a36108
Commit
86a36108
authored
Sep 23, 2014
by
Gabriel Dume
Committed by
Diego Biurrun
Sep 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lmlm4: K&R formatting cosmetics
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
95d312d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
lmlm4.c
libavformat/lmlm4.c
+20
-17
No files found.
libavformat/lmlm4.c
View file @
86a36108
...
...
@@ -23,6 +23,7 @@
*/
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
...
...
@@ -34,23 +35,23 @@
#define LMLM4_MAX_PACKET_SIZE 1024 * 1024
static
int
lmlm4_probe
(
AVProbeData
*
pd
)
{
static
int
lmlm4_probe
(
AVProbeData
*
pd
)
{
unsigned
char
*
buf
=
pd
->
buf
;
unsigned
int
frame_type
,
packet_size
;
frame_type
=
AV_RB16
(
buf
+
2
);
packet_size
=
AV_RB32
(
buf
+
4
);
frame_type
=
AV_RB16
(
buf
+
2
);
packet_size
=
AV_RB32
(
buf
+
4
);
if
(
!
AV_RB16
(
buf
)
&&
frame_type
<=
LMLM4_MPEG1L2
&&
packet_size
&&
frame_type
!=
LMLM4_INVALID
&&
packet_size
<=
LMLM4_MAX_PACKET_SIZE
)
{
if
(
frame_type
==
LMLM4_MPEG1L2
)
{
if
((
AV_RB16
(
buf
+
8
)
&
0xfffe
)
!=
0xfffc
)
if
((
AV_RB16
(
buf
+
8
)
&
0xfffe
)
!=
0xfffc
)
return
0
;
/* I could calculate the audio framesize and compare with
* packet_size-8, but that seems overkill */
return
AVPROBE_SCORE_MAX
/
3
;
}
else
if
(
AV_RB24
(
buf
+
8
)
==
0x000001
)
{
/* PES Signal */
}
else
if
(
AV_RB24
(
buf
+
8
)
==
0x000001
)
{
/* PES Signal */
return
AVPROBE_SCORE_MAX
/
5
;
}
}
...
...
@@ -58,7 +59,8 @@ static int lmlm4_probe(AVProbeData * pd) {
return
0
;
}
static
int
lmlm4_read_header
(
AVFormatContext
*
s
)
{
static
int
lmlm4_read_header
(
AVFormatContext
*
s
)
{
AVStream
*
st
;
if
(
!
(
st
=
avformat_new_stream
(
s
,
NULL
)))
...
...
@@ -78,7 +80,8 @@ static int lmlm4_read_header(AVFormatContext *s) {
return
0
;
}
static
int
lmlm4_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
static
int
lmlm4_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
AVIOContext
*
pb
=
s
->
pb
;
int
ret
;
unsigned
int
frame_type
,
packet_size
,
padding
,
frame_size
;
...
...
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