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
2e0ab4d3
Commit
2e0ab4d3
authored
Oct 27, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp56: stop using deprecated avcodec_set_dimensions
parent
b53febc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
vp5.c
libavcodec/vp5.c
+4
-1
vp56.c
libavcodec/vp56.c
+2
-2
vp6.c
libavcodec/vp6.c
+6
-2
No files found.
libavcodec/vp5.c
View file @
2e0ab4d3
...
...
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
...
...
@@ -67,7 +68,9 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
if
(
!
s
->
macroblocks
||
/* first frame */
16
*
cols
!=
s
->
avctx
->
coded_width
||
16
*
rows
!=
s
->
avctx
->
coded_height
)
{
avcodec_set_dimensions
(
s
->
avctx
,
16
*
cols
,
16
*
rows
);
int
ret
=
ff_set_dimensions
(
s
->
avctx
,
16
*
cols
,
16
*
rows
);
if
(
ret
<
0
)
return
ret
;
return
VP56_SIZE_CHANGE
;
}
}
else
if
(
!
s
->
macroblocks
)
...
...
libavcodec/vp56.c
View file @
2e0ab4d3
...
...
@@ -470,7 +470,7 @@ static int vp56_size_changed(AVCodecContext *avctx)
s
->
mb_height
=
(
avctx
->
coded_height
+
15
)
/
16
;
if
(
s
->
mb_width
>
1000
||
s
->
mb_height
>
1000
)
{
avcodec
_set_dimensions
(
avctx
,
0
,
0
);
ff
_set_dimensions
(
avctx
,
0
,
0
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"picture too big
\n
"
);
return
-
1
;
}
...
...
@@ -528,7 +528,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
for
(
i
=
0
;
i
<
4
;
i
++
)
av_frame_unref
(
s
->
frames
[
i
]);
if
(
is_alpha
)
{
avcodec
_set_dimensions
(
avctx
,
0
,
0
);
ff
_set_dimensions
(
avctx
,
0
,
0
);
return
-
1
;
}
}
...
...
libavcodec/vp6.c
View file @
2e0ab4d3
...
...
@@ -32,6 +32,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "huffman.h"
#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
...
...
@@ -93,7 +94,10 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
s
->
avctx
->
coded_width
=
16
*
cols
;
s
->
avctx
->
coded_height
=
16
*
rows
;
}
else
{
avcodec_set_dimensions
(
s
->
avctx
,
16
*
cols
,
16
*
rows
);
int
ret
=
ff_set_dimensions
(
s
->
avctx
,
16
*
cols
,
16
*
rows
);
if
(
ret
<
0
)
return
ret
;
if
(
s
->
avctx
->
extradata_size
==
1
)
{
s
->
avctx
->
width
-=
s
->
avctx
->
extradata
[
0
]
>>
4
;
s
->
avctx
->
height
-=
s
->
avctx
->
extradata
[
0
]
&
0x0F
;
...
...
@@ -154,7 +158,7 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
buf_size
-=
coeff_offset
;
if
(
buf_size
<
0
)
{
if
(
s
->
frames
[
VP56_FRAME_CURRENT
]
->
key_frame
)
avcodec
_set_dimensions
(
s
->
avctx
,
0
,
0
);
ff
_set_dimensions
(
s
->
avctx
,
0
,
0
);
return
AVERROR_INVALIDDATA
;
}
if
(
s
->
use_huffman
)
{
...
...
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