Minor debugging improvements
This commit is contained in:
parent
509dba2264
commit
2853e498b0
1 changed files with 3 additions and 4 deletions
|
|
@ -128,6 +128,9 @@ bool FFmpegVideoDecoder::completeInitialization(AVCodec* decoder, int videoForma
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nobody must override our ffGetFormat
|
||||||
|
SDL_assert(m_VideoDecoderCtx->get_format == ffGetFormat);
|
||||||
|
|
||||||
// Stash a pointer to this object in the context
|
// Stash a pointer to this object in the context
|
||||||
SDL_assert(m_VideoDecoderCtx->opaque == nullptr);
|
SDL_assert(m_VideoDecoderCtx->opaque == nullptr);
|
||||||
m_VideoDecoderCtx->opaque = this;
|
m_VideoDecoderCtx->opaque = this;
|
||||||
|
|
@ -157,8 +160,6 @@ bool FFmpegVideoDecoder::completeInitialization(AVCodec* decoder, int videoForma
|
||||||
|
|
||||||
err = avcodec_send_packet(m_VideoDecoderCtx, &m_Pkt);
|
err = avcodec_send_packet(m_VideoDecoderCtx, &m_Pkt);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
|
||||||
"Test decode failed: %d", err);
|
|
||||||
char errorstring[512];
|
char errorstring[512];
|
||||||
av_strerror(err, errorstring, sizeof(errorstring));
|
av_strerror(err, errorstring, sizeof(errorstring));
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|
@ -305,8 +306,6 @@ int FFmpegVideoDecoder::submitDecodeUnit(PDECODE_UNIT du)
|
||||||
|
|
||||||
err = avcodec_send_packet(m_VideoDecoderCtx, &m_Pkt);
|
err = avcodec_send_packet(m_VideoDecoderCtx, &m_Pkt);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
|
||||||
"Decoding failed: %d", err);
|
|
||||||
char errorstring[512];
|
char errorstring[512];
|
||||||
av_strerror(err, errorstring, sizeof(errorstring));
|
av_strerror(err, errorstring, sizeof(errorstring));
|
||||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue