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
e8d36ba4
Commit
e8d36ba4
authored
Jan 02, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/yop: use ff_get_extradata()
parent
1139887a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
yop.c
libavformat/yop.c
+3
-7
No files found.
libavformat/yop.c
View file @
e8d36ba4
...
...
@@ -68,10 +68,6 @@ static int yop_read_header(AVFormatContext *s)
if
(
!
audio_stream
||
!
video_stream
)
return
AVERROR
(
ENOMEM
);
// Extra data that will be passed to the decoder
if
(
ff_alloc_extradata
(
video_stream
->
codecpar
,
8
))
return
AVERROR
(
ENOMEM
);
// Audio
audio_par
=
audio_stream
->
codecpar
;
audio_par
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
...
...
@@ -94,9 +90,9 @@ static int yop_read_header(AVFormatContext *s)
video_stream
->
sample_aspect_ratio
=
(
AVRational
){
1
,
2
};
ret
=
avio_read
(
pb
,
video_par
->
extradata
,
8
);
if
(
ret
<
8
)
return
ret
<
0
?
ret
:
AVERROR_EOF
;
ret
=
ff_get_extradata
(
s
,
video_par
,
pb
,
8
);
if
(
ret
<
0
)
return
ret
;
yop
->
palette_size
=
video_par
->
extradata
[
0
]
*
3
+
4
;
yop
->
audio_block_length
=
AV_RL16
(
video_par
->
extradata
+
6
);
...
...
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