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
4e03b209
Commit
4e03b209
authored
Sep 25, 2014
by
Rémi Denis-Courmont
Committed by
Luca Barbato
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12: Always invoke the get_format() callback
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
ce423163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
mpeg12dec.c
libavcodec/mpeg12dec.c
+16
-3
No files found.
libavcodec/mpeg12dec.c
View file @
4e03b209
...
...
@@ -1181,10 +1181,21 @@ static const enum AVPixelFormat mpeg12_hwaccel_pixfmt_list_420[] = {
AV_PIX_FMT_NONE
};
static
const
enum
AVPixelFormat
mpeg12_pixfmt_list_422
[]
=
{
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_NONE
};
static
const
enum
AVPixelFormat
mpeg12_pixfmt_list_444
[]
=
{
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_NONE
};
static
enum
AVPixelFormat
mpeg_get_pixelformat
(
AVCodecContext
*
avctx
)
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
const
enum
AVPixelFormat
*
pix_fmts
;
#if FF_API_XVMC
FF_DISABLE_DEPRECATION_WARNINGS
...
...
@@ -1194,11 +1205,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif
/* FF_API_XVMC */
if
(
s
->
chroma_format
<
2
)
return
ff_get_format
(
avctx
,
mpeg12_hwaccel_pixfmt_list_420
)
;
pix_fmts
=
mpeg12_hwaccel_pixfmt_list_420
;
else
if
(
s
->
chroma_format
==
2
)
return
AV_PIX_FMT_YUV422P
;
pix_fmts
=
mpeg12_pixfmt_list_422
;
else
return
AV_PIX_FMT_YUV444P
;
pix_fmts
=
mpeg12_pixfmt_list_444
;
return
ff_get_format
(
avctx
,
pix_fmts
);
}
/* Call this function when we know all parameters.
...
...
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