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
fcbb9471
Commit
fcbb9471
authored
Dec 23, 2013
by
Peter Ross
Committed by
Michael Niedermayer
Dec 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riffenc: add option to ff_put_bmp_header to ignore extradata
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d08ea75a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
6 deletions
+8
-6
asfenc.c
libavformat/asfenc.c
+1
-1
avienc.c
libavformat/avienc.c
+1
-1
matroskaenc.c
libavformat/matroskaenc.c
+1
-1
riff.h
libavformat/riff.h
+1
-1
riffenc.c
libavformat/riffenc.c
+4
-2
No files found.
libavformat/asfenc.c
View file @
fcbb9471
...
...
@@ -525,7 +525,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
avio_wl16
(
pb
,
40
+
enc
->
extradata_size
);
/* size */
/* BITMAPINFOHEADER header */
ff_put_bmp_header
(
pb
,
enc
,
ff_codec_bmp_tags
,
1
);
ff_put_bmp_header
(
pb
,
enc
,
ff_codec_bmp_tags
,
1
,
0
);
}
end_header
(
pb
,
hpos
);
}
...
...
libavformat/avienc.c
View file @
fcbb9471
...
...
@@ -293,7 +293,7 @@ static int avi_write_header(AVFormatContext *s)
// are not (yet) supported.
if
(
stream
->
codec_id
!=
AV_CODEC_ID_XSUB
)
break
;
case
AVMEDIA_TYPE_VIDEO
:
ff_put_bmp_header
(
pb
,
stream
,
ff_codec_bmp_tags
,
0
);
ff_put_bmp_header
(
pb
,
stream
,
ff_codec_bmp_tags
,
0
,
0
);
break
;
case
AVMEDIA_TYPE_AUDIO
:
if
((
ret
=
ff_put_wav_header
(
pb
,
stream
))
<
0
)
{
...
...
libavformat/matroskaenc.c
View file @
fcbb9471
...
...
@@ -559,7 +559,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
ret
=
AVERROR
(
EINVAL
);
}
ff_put_bmp_header
(
dyn_cp
,
codec
,
ff_codec_bmp_tags
,
0
);
ff_put_bmp_header
(
dyn_cp
,
codec
,
ff_codec_bmp_tags
,
0
,
0
);
}
}
else
if
(
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
...
...
libavformat/riff.h
View file @
fcbb9471
...
...
@@ -45,7 +45,7 @@ void ff_end_tag(AVIOContext *pb, int64_t start);
*/
int
ff_get_bmp_header
(
AVIOContext
*
pb
,
AVStream
*
st
,
unsigned
*
esize
);
void
ff_put_bmp_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
);
void
ff_put_bmp_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
,
int
ignore_extradata
);
int
ff_put_wav_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
);
enum
AVCodecID
ff_wav_codec_get_id
(
unsigned
int
tag
,
int
bps
);
int
ff_get_wav_header
(
AVIOContext
*
pb
,
AVCodecContext
*
codec
,
int
size
);
...
...
libavformat/riffenc.c
View file @
fcbb9471
...
...
@@ -201,10 +201,10 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
/* BITMAPINFOHEADER header */
void
ff_put_bmp_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
)
const
AVCodecTag
*
tags
,
int
for_asf
,
int
ignore_extradata
)
{
/* size */
avio_wl32
(
pb
,
40
+
enc
->
extradata_size
);
avio_wl32
(
pb
,
40
+
(
ignore_extradata
?
0
:
enc
->
extradata_size
)
);
avio_wl32
(
pb
,
enc
->
width
);
//We always store RGB TopDown
avio_wl32
(
pb
,
enc
->
codec_tag
?
enc
->
height
:
-
enc
->
height
);
...
...
@@ -220,10 +220,12 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc,
avio_wl32
(
pb
,
0
);
avio_wl32
(
pb
,
0
);
if
(
!
ignore_extradata
)
{
avio_write
(
pb
,
enc
->
extradata
,
enc
->
extradata_size
);
if
(
!
for_asf
&&
enc
->
extradata_size
&
1
)
avio_w8
(
pb
,
0
);
}
}
void
ff_parse_specific_params
(
AVCodecContext
*
stream
,
int
*
au_rate
,
...
...
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