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
952c69c4
Commit
952c69c4
authored
Mar 08, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huffyuv encoding fixed
Originally committed as revision 1647 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b559b29b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
avidec.c
libavformat/avidec.c
+3
-0
avienc.c
libavformat/avienc.c
+8
-2
No files found.
libavformat/avidec.c
View file @
952c69c4
...
@@ -174,6 +174,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -174,6 +174,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
st
->
codec
.
extradata_size
=
size
-
10
*
4
;
st
->
codec
.
extradata_size
=
size
-
10
*
4
;
st
->
codec
.
extradata
=
av_malloc
(
st
->
codec
.
extradata_size
);
//FIXME where should we free this?
st
->
codec
.
extradata
=
av_malloc
(
st
->
codec
.
extradata_size
);
//FIXME where should we free this?
get_buffer
(
pb
,
st
->
codec
.
extradata
,
st
->
codec
.
extradata_size
);
get_buffer
(
pb
,
st
->
codec
.
extradata
,
st
->
codec
.
extradata_size
);
if
(
st
->
codec
.
extradata_size
&
1
)
//FIXME check if the encoder really did this correctly
get_byte
(
pb
);
#ifdef DEBUG
#ifdef DEBUG
print_tag
(
"video"
,
tag1
,
0
);
print_tag
(
"video"
,
tag1
,
0
);
...
...
libavformat/avienc.c
View file @
952c69c4
...
@@ -129,11 +129,12 @@ unsigned int codec_get_bmp_tag(int id)
...
@@ -129,11 +129,12 @@ unsigned int codec_get_bmp_tag(int id)
/* BITMAPINFOHEADER header */
/* BITMAPINFOHEADER header */
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
CodecTag
*
tags
,
int
for_asf
)
void
put_bmp_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
,
const
CodecTag
*
tags
,
int
for_asf
)
{
{
put_le32
(
pb
,
40
);
/* size */
put_le32
(
pb
,
40
+
enc
->
extradata_size
);
/* size */
put_le32
(
pb
,
enc
->
width
);
put_le32
(
pb
,
enc
->
width
);
put_le32
(
pb
,
enc
->
height
);
put_le32
(
pb
,
enc
->
height
);
put_le16
(
pb
,
1
);
/* planes */
put_le16
(
pb
,
1
);
/* planes */
put_le16
(
pb
,
24
);
/* depth */
put_le16
(
pb
,
enc
->
bits_per_sample
?
enc
->
bits_per_sample
:
24
);
/* depth */
/* compression type */
/* compression type */
put_le32
(
pb
,
for_asf
?
codec_get_asf_tag
(
tags
,
enc
->
codec_id
)
:
codec_get_tag
(
tags
,
enc
->
codec_id
));
put_le32
(
pb
,
for_asf
?
codec_get_asf_tag
(
tags
,
enc
->
codec_id
)
:
codec_get_tag
(
tags
,
enc
->
codec_id
));
put_le32
(
pb
,
enc
->
width
*
enc
->
height
*
3
);
put_le32
(
pb
,
enc
->
width
*
enc
->
height
*
3
);
...
@@ -141,6 +142,11 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags
...
@@ -141,6 +142,11 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_le32
(
pb
,
0
);
put_buffer
(
pb
,
enc
->
extradata
,
enc
->
extradata_size
);
if
(
enc
->
extradata_size
&
1
)
put_byte
(
pb
,
0
);
}
}
static
void
parse_specific_params
(
AVCodecContext
*
stream
,
int
*
au_byterate
,
int
*
au_ssize
,
int
*
au_scale
)
static
void
parse_specific_params
(
AVCodecContext
*
stream
,
int
*
au_byterate
,
int
*
au_ssize
,
int
*
au_scale
)
...
...
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