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
40dd5166
Commit
40dd5166
authored
Jun 21, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truemotion2rt: Use ff_set_dimensions
parent
a8164323
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
truemotion2rt.c
libavcodec/truemotion2rt.c
+8
-3
No files found.
libavcodec/truemotion2rt.c
View file @
40dd5166
...
...
@@ -63,7 +63,8 @@ static int truemotion2rt_decode_header(AVCodecContext *avctx, AVPacket *avpkt)
uint8_t
header_buffer
[
128
]
=
{
0
};
/* logical maximum header size */
const
uint8_t
*
buf
=
avpkt
->
data
;
int
size
=
avpkt
->
size
;
int
i
;
int
width
,
height
;
int
ret
,
i
;
if
(
size
<
1
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"input packet too small (%d)
\n
"
,
size
);
...
...
@@ -90,8 +91,12 @@ static int truemotion2rt_decode_header(AVCodecContext *avctx, AVPacket *avpkt)
if
(
s
->
delta_size
<
2
||
s
->
delta_size
>
4
)
return
AVERROR_INVALIDDATA
;
avctx
->
height
=
AV_RL16
(
header_buffer
+
5
);
avctx
->
width
=
AV_RL16
(
header_buffer
+
7
);
height
=
AV_RL16
(
header_buffer
+
5
);
width
=
AV_RL16
(
header_buffer
+
7
);
ret
=
ff_set_dimensions
(
avctx
,
width
,
height
);
if
(
ret
<
0
)
return
ret
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Header size: %d
\n
"
,
header_size
);
return
header_size
;
...
...
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