Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e839de0f
Commit
e839de0f
authored
Aug 28, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggenc: accept only STREAMINFO extradata
The reasoning is the same as for
0097cbea
.
parent
c070a875
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
oggenc.c
libavformat/oggenc.c
+3
-5
No files found.
libavformat/oggenc.c
View file @
e839de0f
...
@@ -295,12 +295,10 @@ static int ogg_build_flac_headers(AVCodecContext *avctx,
...
@@ -295,12 +295,10 @@ static int ogg_build_flac_headers(AVCodecContext *avctx,
OGGStreamContext
*
oggstream
,
int
bitexact
,
OGGStreamContext
*
oggstream
,
int
bitexact
,
AVDictionary
**
m
)
AVDictionary
**
m
)
{
{
enum
FLACExtradataFormat
format
;
uint8_t
*
streaminfo
;
uint8_t
*
p
;
uint8_t
*
p
;
if
(
!
avpriv_flac_is_extradata_valid
(
avctx
,
&
format
,
&
streaminfo
)
)
if
(
avctx
->
extradata_size
<
FLAC_STREAMINFO_SIZE
)
return
-
1
;
return
AVERROR
(
EINVAL
)
;
// first packet: STREAMINFO
// first packet: STREAMINFO
oggstream
->
header_len
[
0
]
=
51
;
oggstream
->
header_len
[
0
]
=
51
;
...
@@ -316,7 +314,7 @@ static int ogg_build_flac_headers(AVCodecContext *avctx,
...
@@ -316,7 +314,7 @@ static int ogg_build_flac_headers(AVCodecContext *avctx,
bytestream_put_buffer
(
&
p
,
"fLaC"
,
4
);
bytestream_put_buffer
(
&
p
,
"fLaC"
,
4
);
bytestream_put_byte
(
&
p
,
0x00
);
// streaminfo
bytestream_put_byte
(
&
p
,
0x00
);
// streaminfo
bytestream_put_be24
(
&
p
,
34
);
bytestream_put_be24
(
&
p
,
34
);
bytestream_put_buffer
(
&
p
,
streaminfo
,
FLAC_STREAMINFO_SIZE
);
bytestream_put_buffer
(
&
p
,
avctx
->
extradata
,
FLAC_STREAMINFO_SIZE
);
// second packet: VorbisComment
// second packet: VorbisComment
p
=
ogg_write_vorbiscomment
(
4
,
bitexact
,
&
oggstream
->
header_len
[
1
],
m
,
0
);
p
=
ogg_write_vorbiscomment
(
4
,
bitexact
,
&
oggstream
->
header_len
[
1
],
m
,
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