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
6da9c9d3
Commit
6da9c9d3
authored
Oct 27, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo_parser: stop using deprecated avcodec_set_dimensions
parent
13207484
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mpegvideo_parser.c
libavcodec/mpegvideo_parser.c
+2
-2
No files found.
libavcodec/mpegvideo_parser.c
View file @
6da9c9d3
...
...
@@ -62,7 +62,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
pc
->
width
=
(
buf
[
0
]
<<
4
)
|
(
buf
[
1
]
>>
4
);
pc
->
height
=
((
buf
[
1
]
&
0x0f
)
<<
8
)
|
buf
[
2
];
if
(
!
avctx
->
width
||
!
avctx
->
height
||
!
avctx
->
coded_width
||
!
avctx
->
coded_height
){
avcodec
_set_dimensions
(
avctx
,
pc
->
width
,
pc
->
height
);
ff
_set_dimensions
(
avctx
,
pc
->
width
,
pc
->
height
);
did_set_size
=
1
;
}
frame_rate_index
=
buf
[
3
]
&
0xf
;
...
...
@@ -90,7 +90,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
pc
->
height
|=
(
vert_size_ext
<<
12
);
avctx
->
bit_rate
+=
(
bit_rate_ext
<<
18
)
*
400
;
if
(
did_set_size
)
avcodec
_set_dimensions
(
avctx
,
pc
->
width
,
pc
->
height
);
ff
_set_dimensions
(
avctx
,
pc
->
width
,
pc
->
height
);
avctx
->
time_base
.
den
=
pc
->
frame_rate
.
den
*
(
frame_rate_ext_n
+
1
)
*
2
;
avctx
->
time_base
.
num
=
pc
->
frame_rate
.
num
*
(
frame_rate_ext_d
+
1
);
avctx
->
codec_id
=
AV_CODEC_ID_MPEG2VIDEO
;
...
...
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