Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

xvba: set a flag in order to determine if ffmpeg failed (quick hack)

  • Loading branch information...
commit baefaf96d91a73587e038fc6f83d8ee43a79afae 1 parent a619a69
@FernetMenta authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
View
7 xbmc/cores/dvdplayer/DVDCodecs/Video/XVBA.cpp
@@ -960,6 +960,7 @@ void CDecoder::FFDrawSlice(struct AVCodecContext *avctx,
}
usleep(100);
}
+ render->state |= 4;
}
int CDecoder::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic)
@@ -1066,6 +1067,7 @@ int CDecoder::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic)
pic->type= FF_BUFFER_TYPE_USER;
render->state |= FF_XVBA_STATE_USED_FOR_REFERENCE;
+ render->state &= ~4;
pic->reordered_opaque= avctx->reordered_opaque;
return 0;
@@ -1093,6 +1095,11 @@ int CDecoder::Decode(AVCodecContext* avctx, AVFrame* frame)
CLog::Log(LOGWARNING, "XVBA::Decode - ignoring invalid buffer");
return VC_BUFFER;
}
+ if (!(render->state & 4))
+ {
+ CLog::Log(LOGDEBUG, "XVBA::Decode - ffmpeg failed");
+ return VC_BUFFER;
+ }
render->state |= FF_XVBA_STATE_USED_FOR_RENDER;
Please sign in to comment.
Something went wrong with that request. Please try again.