Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9d80b1ae
Commit
9d80b1ae
authored
Jan 19, 2014
by
Sam Lantinga
Committed by
Luca Barbato
Jan 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Log errors verbosely
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
5b2b23f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
dxva2.c
libavcodec/dxva2.c
+18
-9
No files found.
libavcodec/dxva2.c
View file @
9d80b1ae
...
@@ -50,10 +50,13 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
...
@@ -50,10 +50,13 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
void
*
dxva_data
;
void
*
dxva_data
;
unsigned
dxva_size
;
unsigned
dxva_size
;
int
result
;
int
result
;
HRESULT
hr
;
if
(
FAILED
(
IDirectXVideoDecoder_GetBuffer
(
ctx
->
decoder
,
type
,
hr
=
IDirectXVideoDecoder_GetBuffer
(
ctx
->
decoder
,
type
,
&
dxva_data
,
&
dxva_size
)))
{
&
dxva_data
,
&
dxva_size
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to get a buffer for %d
\n
"
,
type
);
if
(
FAILED
(
hr
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to get a buffer for %d: 0x%x
\n
"
,
type
,
hr
);
return
-
1
;
return
-
1
;
}
}
if
(
size
<=
dxva_size
)
{
if
(
size
<=
dxva_size
)
{
...
@@ -69,8 +72,12 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
...
@@ -69,8 +72,12 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Buffer for type %d was too small
\n
"
,
type
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Buffer for type %d was too small
\n
"
,
type
);
result
=
-
1
;
result
=
-
1
;
}
}
if
(
FAILED
(
IDirectXVideoDecoder_ReleaseBuffer
(
ctx
->
decoder
,
type
)))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to release buffer type %d
\n
"
,
type
);
hr
=
IDirectXVideoDecoder_ReleaseBuffer
(
ctx
->
decoder
,
type
);
if
(
FAILED
(
hr
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to release buffer type %d: 0x%x
\n
"
,
type
,
hr
);
result
=
-
1
;
result
=
-
1
;
}
}
return
result
;
return
result
;
...
@@ -142,14 +149,16 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, Picture *pic,
...
@@ -142,14 +149,16 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, Picture *pic,
exec
.
NumCompBuffers
=
buffer_count
;
exec
.
NumCompBuffers
=
buffer_count
;
exec
.
pCompressedBuffers
=
buffer
;
exec
.
pCompressedBuffers
=
buffer
;
exec
.
pExtensionData
=
NULL
;
exec
.
pExtensionData
=
NULL
;
if
(
FAILED
(
IDirectXVideoDecoder_Execute
(
ctx
->
decoder
,
&
exec
)))
{
hr
=
IDirectXVideoDecoder_Execute
(
ctx
->
decoder
,
&
exec
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to execute
\n
"
);
if
(
FAILED
(
hr
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to execute: 0x%x
\n
"
,
hr
);
result
=
-
1
;
result
=
-
1
;
}
}
end:
end:
if
(
FAILED
(
IDirectXVideoDecoder_EndFrame
(
ctx
->
decoder
,
NULL
)))
{
hr
=
IDirectXVideoDecoder_EndFrame
(
ctx
->
decoder
,
NULL
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to end frame
\n
"
);
if
(
FAILED
(
hr
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to end frame: 0x%x
\n
"
,
hr
);
result
=
-
1
;
result
=
-
1
;
}
}
...
...
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