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
57b00d7a
Commit
57b00d7a
authored
Nov 30, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gifdec: remove width and height from demuxer context
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
2c69fcc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
gifdec.c
libavformat/gifdec.c
+6
-8
No files found.
libavformat/gifdec.c
View file @
57b00d7a
...
...
@@ -32,8 +32,6 @@
typedef
struct
GIFDemuxContext
{
const
AVClass
*
class
;
uint32_t
width
;
uint32_t
height
;
/**
* Time span in hundredths of second before
* the next frame should be drawn on screen.
...
...
@@ -79,17 +77,17 @@ static int gif_read_header(AVFormatContext *s)
GIFDemuxContext
*
gdc
=
s
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
AVStream
*
st
;
int
ret
;
int
width
,
height
,
ret
;
/* skip 6-byte magick */
if
((
ret
=
avio_skip
(
pb
,
6
))
<
0
)
return
ret
;
gdc
->
delay
=
gdc
->
default_delay
;
gdc
->
width
=
avio_rl16
(
pb
);
gdc
->
height
=
avio_rl16
(
pb
);
width
=
avio_rl16
(
pb
);
height
=
avio_rl16
(
pb
);
if
(
gdc
->
width
==
0
||
gdc
->
height
==
0
)
if
(
width
==
0
||
height
==
0
)
return
AVERROR_INVALIDDATA
;
st
=
avformat_new_stream
(
s
,
NULL
);
...
...
@@ -101,8 +99,8 @@ static int gif_read_header(AVFormatContext *s)
avpriv_set_pts_info
(
st
,
64
,
1
,
100
);
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_GIF
;
st
->
codec
->
width
=
gdc
->
width
;
st
->
codec
->
height
=
gdc
->
height
;
st
->
codec
->
width
=
width
;
st
->
codec
->
height
=
height
;
/* jump to start because gif decoder needs header data too */
if
(
avio_seek
(
pb
,
0
,
SEEK_SET
)
!=
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