5b2b23f2d69e05c5fcd1c933e383fe60e185574d is missing some includes,
contextually use the long modifier to print errors.
---
libavcodec/dxva2.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c
index f8b8eba..3bcfddd 100644
--- a/libavcodec/dxva2.c
+++ b/libavcodec/dxva2.c
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <string.h>
+#include "libavutil/time.h"
#include "dxva2_internal.h"
void *ff_dxva2_get_surface(const Picture *picture)
@@ -55,7 +57,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
hr = IDirectXVideoDecoder_GetBuffer(ctx->decoder, type,
&dxva_data, &dxva_size);
if (FAILED(hr)) {
- av_log(avctx, AV_LOG_ERROR, "Failed to get a buffer for %d: 0x%x\n",
+ av_log(avctx, AV_LOG_ERROR, "Failed to get a buffer for %d: 0x%lx\n",
type, hr);
return -1;
}
@@ -76,7 +78,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
hr = IDirectXVideoDecoder_ReleaseBuffer(ctx->decoder, type);
if (FAILED(hr)) {
av_log(avctx, AV_LOG_ERROR,
- "Failed to release buffer type %d: 0x%x\n",
+ "Failed to release buffer type %d: 0x%lx\n",
type, hr);
result = -1;
}
@@ -106,7 +108,7 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx,
Picture *pic,
} while (hr == E_PENDING && ++runs < 50);
if (FAILED(hr)) {
- av_log(avctx, AV_LOG_ERROR, "Failed to begin frame: 0x%x\n", hr);
+ av_log(avctx, AV_LOG_ERROR, "Failed to begin frame: 0x%lx\n", hr);
return -1;
}
@@ -151,14 +153,14 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx,
Picture *pic,
exec.pExtensionData = NULL;
hr = IDirectXVideoDecoder_Execute(ctx->decoder, &exec);
if (FAILED(hr)) {
- av_log(avctx, AV_LOG_ERROR, "Failed to execute: 0x%x\n", hr);
+ av_log(avctx, AV_LOG_ERROR, "Failed to execute: 0x%lx\n", hr);
result = -1;
}
end:
hr = IDirectXVideoDecoder_EndFrame(ctx->decoder, NULL);
if (FAILED(hr)) {
- av_log(avctx, AV_LOG_ERROR, "Failed to end frame: 0x%x\n", hr);
+ av_log(avctx, AV_LOG_ERROR, "Failed to end frame: 0x%lx\n", hr);
result = -1;
}
--
1.8.5.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel