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
4600a85e
Commit
4600a85e
authored
Aug 15, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Pass variable of correct type to IDirectXVideoDecoder_GetBuffer()
This avoids related incompatible pointer type warnings.
parent
37c46743
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
dxva2_h264.c
libavcodec/dxva2_h264.c
+5
-2
dxva2_mpeg2.c
libavcodec/dxva2_mpeg2.c
+4
-1
dxva2_vc1.c
libavcodec/dxva2_vc1.c
+3
-1
No files found.
libavcodec/dxva2_h264.c
View file @
4600a85e
...
...
@@ -297,6 +297,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
const
H264Picture
*
current_picture
=
h
->
cur_pic_ptr
;
struct
dxva2_picture_context
*
ctx_pic
=
current_picture
->
hwaccel_picture_private
;
DXVA_Slice_H264_Short
*
slice
=
NULL
;
void
*
dxva_data_ptr
;
uint8_t
*
dxva_data
,
*
current
,
*
end
;
unsigned
dxva_size
;
void
*
slice_data
;
...
...
@@ -306,9 +307,11 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
/* Create an annex B bitstream buffer with only slice NAL and finalize slice */
if
(
FAILED
(
IDirectXVideoDecoder_GetBuffer
(
ctx
->
decoder
,
DXVA2_BitStreamDateBufferType
,
&
dxva_data
,
&
dxva_size
)))
DXVA2_BitStreamDateBufferType
,
&
dxva_data_ptr
,
&
dxva_size
)))
return
-
1
;
dxva_data
=
dxva_data_ptr
;
current
=
dxva_data
;
end
=
dxva_data
+
dxva_size
;
...
...
libavcodec/dxva2_mpeg2.c
View file @
4600a85e
...
...
@@ -156,14 +156,17 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
s
->
current_picture_ptr
->
hwaccel_picture_private
;
const
int
is_field
=
s
->
picture_structure
!=
PICT_FRAME
;
const
unsigned
mb_count
=
s
->
mb_width
*
(
s
->
mb_height
>>
is_field
);
void
*
dxva_data_ptr
;
uint8_t
*
dxva_data
,
*
current
,
*
end
;
unsigned
dxva_size
;
unsigned
i
;
if
(
FAILED
(
IDirectXVideoDecoder_GetBuffer
(
ctx
->
decoder
,
DXVA2_BitStreamDateBufferType
,
&
dxva_data
,
&
dxva_size
)))
&
dxva_data
_ptr
,
&
dxva_size
)))
return
-
1
;
dxva_data
=
dxva_data_ptr
;
current
=
dxva_data
;
end
=
dxva_data
+
dxva_size
;
...
...
libavcodec/dxva2_vc1.c
View file @
4600a85e
...
...
@@ -173,15 +173,17 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
const
unsigned
padding
=
128
-
((
start_code_size
+
slice_size
)
&
127
);
const
unsigned
data_size
=
start_code_size
+
slice_size
+
padding
;
void
*
dxva_data_ptr
;
uint8_t
*
dxva_data
;
unsigned
dxva_size
;
int
result
;
if
(
FAILED
(
IDirectXVideoDecoder_GetBuffer
(
ctx
->
decoder
,
DXVA2_BitStreamDateBufferType
,
&
dxva_data
,
&
dxva_size
)))
&
dxva_data
_ptr
,
&
dxva_size
)))
return
-
1
;
dxva_data
=
dxva_data_ptr
;
result
=
data_size
<=
dxva_size
?
0
:
-
1
;
if
(
!
result
)
{
if
(
start_code_size
>
0
)
...
...
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