Browse Source

Merge remote-tracking branch 'dilaroga/master'

* dilaroga/master:
  vda: fix crash when a frame is dropped.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
e9314f1968
2 changed files with 9 additions and 0 deletions
  1. +6
    -0
      libavcodec/vda.h
  2. +3
    -0
      libavcodec/vda_h264.c

+ 6
- 0
libavcodec/vda.h View File

@@ -41,6 +41,12 @@


#include "libavcodec/version.h" #include "libavcodec/version.h"


// extra flags not defined in VDADecoder.h
enum {
kVDADecodeInfo_Asynchronous = 1UL << 0,
kVDADecodeInfo_FrameDropped = 1UL << 1
};

/** /**
* @defgroup lavc_codec_hwaccel_vda VDA * @defgroup lavc_codec_hwaccel_vda VDA
* @ingroup lavc_codec_hwaccel * @ingroup lavc_codec_hwaccel


+ 3
- 0
libavcodec/vda_h264.c View File

@@ -41,6 +41,9 @@ static void vda_decoder_callback(void *vda_hw_ctx,
{ {
struct vda_context *vda_ctx = vda_hw_ctx; struct vda_context *vda_ctx = vda_hw_ctx;


if (infoFlags & kVDADecodeInfo_FrameDropped)
vda_ctx->cv_buffer = NULL;

if (!image_buffer) if (!image_buffer)
return; return;




Loading…
Cancel
Save