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
75146b88
Commit
75146b88
authored
Jan 06, 2012
by
Paul B Mahol
Committed by
Martin Storsjö
Jan 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipmovie: Add param change side data if the video dimensions have changed
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
17aa02b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
ipmovie.c
libavformat/ipmovie.c
+16
-2
No files found.
libavformat/ipmovie.c
View file @
75146b88
...
@@ -89,6 +89,7 @@ typedef struct IPMVEContext {
...
@@ -89,6 +89,7 @@ typedef struct IPMVEContext {
int64_t
video_pts
;
int64_t
video_pts
;
uint32_t
palette
[
256
];
uint32_t
palette
[
256
];
int
has_palette
;
int
has_palette
;
int
changed
;
unsigned
int
audio_bits
;
unsigned
int
audio_bits
;
unsigned
int
audio_channels
;
unsigned
int
audio_channels
;
...
@@ -168,6 +169,10 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
...
@@ -168,6 +169,10 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
}
}
}
}
if
(
s
->
changed
)
{
ff_add_param_change
(
pkt
,
0
,
0
,
0
,
s
->
video_width
,
s
->
video_height
);
s
->
changed
=
0
;
}
pkt
->
pos
=
s
->
decode_map_chunk_offset
;
pkt
->
pos
=
s
->
decode_map_chunk_offset
;
avio_seek
(
pb
,
s
->
decode_map_chunk_offset
,
SEEK_SET
);
avio_seek
(
pb
,
s
->
decode_map_chunk_offset
,
SEEK_SET
);
s
->
decode_map_chunk_offset
=
0
;
s
->
decode_map_chunk_offset
=
0
;
...
@@ -223,6 +228,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
...
@@ -223,6 +228,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
int
first_color
,
last_color
;
int
first_color
,
last_color
;
int
audio_flags
;
int
audio_flags
;
unsigned
char
r
,
g
,
b
;
unsigned
char
r
,
g
,
b
;
unsigned
int
width
,
height
;
/* see if there are any pending packets */
/* see if there are any pending packets */
chunk_type
=
load_ipmovie_packet
(
s
,
pb
,
pkt
);
chunk_type
=
load_ipmovie_packet
(
s
,
pb
,
pkt
);
...
@@ -379,8 +385,16 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
...
@@ -379,8 +385,16 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
chunk_type
=
CHUNK_BAD
;
chunk_type
=
CHUNK_BAD
;
break
;
break
;
}
}
s
->
video_width
=
AV_RL16
(
&
scratch
[
0
])
*
8
;
width
=
AV_RL16
(
&
scratch
[
0
])
*
8
;
s
->
video_height
=
AV_RL16
(
&
scratch
[
2
])
*
8
;
height
=
AV_RL16
(
&
scratch
[
2
])
*
8
;
if
(
width
!=
s
->
video_width
)
{
s
->
video_width
=
width
;
s
->
changed
++
;
}
if
(
height
!=
s
->
video_height
)
{
s
->
video_height
=
height
;
s
->
changed
++
;
}
if
(
opcode_version
<
2
||
!
AV_RL16
(
&
scratch
[
6
]))
{
if
(
opcode_version
<
2
||
!
AV_RL16
(
&
scratch
[
6
]))
{
s
->
video_bpp
=
8
;
s
->
video_bpp
=
8
;
}
else
{
}
else
{
...
...
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