diff options
author | Timothy Pearson <[email protected]> | 2014-10-06 14:02:57 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-10-06 14:02:57 -0500 |
commit | effa31d902975a70f5856ee03b951f5b26054447 (patch) | |
tree | 8587eabd02e623878f63edae1d129fb7b7f1fb4d /k9author/k9avidecode.h | |
parent | 18d94a8600bff14a21c3d47542f8febb1276591b (diff) | |
download | k9copy-effa31d902975a70f5856ee03b951f5b26054447.tar.gz k9copy-effa31d902975a70f5856ee03b951f5b26054447.zip |
Fix crash when img_convert unavailable
Diffstat (limited to 'k9author/k9avidecode.h')
-rw-r--r-- | k9author/k9avidecode.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/k9author/k9avidecode.h b/k9author/k9avidecode.h index 62b7b23..907533d 100644 --- a/k9author/k9avidecode.h +++ b/k9author/k9avidecode.h @@ -22,6 +22,9 @@ #include <libavutil/avutil.h> #endif +#ifdef HAVE_SWSCALE +#include <libswscale/swscale.h> +#endif #include <tqimage.h> @@ -76,7 +79,11 @@ typedef void (*av_close_input_file_t)(AVFormatContext *); typedef int (*av_seek_frame_t)(AVFormatContext *,int,int64_t timestamp,int flags); typedef int64_t (*av_rescale_q_t)(int64_t , AVRational , AVRational ) ; typedef void (*avcodec_flush_buffers_t)(AVCodecContext *); - +#ifdef HAVE_SWSCALE +typedef void (*sws_freeContext_t)(struct SwsContext *swsContext); +typedef struct SwsContext* (*sws_getContext_t)(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param); +typedef int (*sws_scale_t)(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY,int srcSliceH, uint8_t* dst[], int dstStride[]); +#endif class k9AviDecode : public TQObject @@ -138,6 +145,11 @@ private: av_rescale_q_t av_rescale_q; av_gettime_t av_gettime; avcodec_flush_buffers_t avcodec_flush_buffers; +# ifdef HAVE_SWSCALE + sws_freeContext_t sws_freeContext; + sws_getContext_t sws_getContext; + sws_scale_t sws_scale; +# endif AVFormatContext *m_FormatCtx; |