Skip to content

Commit

Permalink
dxva: fix RelBuffer, use correct CDecoder object
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Sep 11, 2014
1 parent b0ef3de commit 07c71cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
Expand Up @@ -53,7 +53,7 @@ using namespace AUTOPTR;
using namespace std;

static void RelBufferS(void *opaque, uint8_t *data)
{ ((CDecoder*)((CDVDVideoCodecFFmpeg*)opaque)->GetHardware())->RelBuffer(data); }
{ ((CDecoder*)opaque)->RelBuffer(data); }

static int GetBufferS(AVCodecContext *avctx, AVFrame *pic, int flags)
{ return ((CDecoder*)((CDVDVideoCodecFFmpeg*)avctx->opaque)->GetHardware())->GetBuffer(avctx, pic, flags); }
Expand Down Expand Up @@ -1104,7 +1104,7 @@ int CDecoder::GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags)

pic->data[0] = (uint8_t*)buf->surface;
pic->data[3] = (uint8_t*)buf->surface;
AVBufferRef *buffer = av_buffer_create(pic->data[3], 0, RelBufferS, avctx->opaque, 0);
AVBufferRef *buffer = av_buffer_create(pic->data[3], 0, RelBufferS, this, 0);
if (!buffer)
{
CLog::Log(LOGERROR, "DXVA - error creating buffer");
Expand Down

0 comments on commit 07c71cc

Please sign in to comment.