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
ddf9b510
Commit
ddf9b510
authored
Nov 15, 2011
by
Matthew Hoops
Committed by
Martin Storsjö
Nov 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
segafilm: add support for raw videos
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
525c5b08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
segafilm.c
libavformat/segafilm.c
+14
-1
No files found.
libavformat/segafilm.c
View file @
ddf9b510
...
...
@@ -34,6 +34,7 @@
#define FDSC_TAG MKBETAG('F', 'D', 'S', 'C')
#define STAB_TAG MKBETAG('S', 'T', 'A', 'B')
#define CVID_TAG MKBETAG('c', 'v', 'i', 'd')
#define RAW_TAG MKBETAG('r', 'a', 'w', ' ')
typedef
struct
{
int
stream
;
...
...
@@ -129,8 +130,11 @@ static int film_read_header(AVFormatContext *s,
if
(
AV_RB32
(
&
scratch
[
8
])
==
CVID_TAG
)
{
film
->
video_type
=
CODEC_ID_CINEPAK
;
}
else
}
else
if
(
AV_RB32
(
&
scratch
[
8
])
==
RAW_TAG
)
{
film
->
video_type
=
CODEC_ID_RAWVIDEO
;
}
else
{
film
->
video_type
=
CODEC_ID_NONE
;
}
/* initialize the decoder streams */
if
(
film
->
video_type
)
{
...
...
@@ -143,6 +147,15 @@ static int film_read_header(AVFormatContext *s,
st
->
codec
->
codec_tag
=
0
;
/* no fourcc */
st
->
codec
->
width
=
AV_RB32
(
&
scratch
[
16
]);
st
->
codec
->
height
=
AV_RB32
(
&
scratch
[
12
]);
if
(
film
->
video_type
==
CODEC_ID_RAWVIDEO
)
{
if
(
scratch
[
20
]
==
24
)
{
st
->
codec
->
pix_fmt
=
PIX_FMT_RGB24
;
}
else
{
av_log
(
s
,
AV_LOG_ERROR
,
"raw video is using unhandled %dbpp
\n
"
,
scratch
[
20
]);
return
-
1
;
}
}
}
if
(
film
->
audio_type
)
{
...
...
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