summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_videotoolbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'fftools/ffmpeg_videotoolbox.c')
-rw-r--r--fftools/ffmpeg_videotoolbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fftools/ffmpeg_videotoolbox.c b/fftools/ffmpeg_videotoolbox.c
index a6b78d0f7d..4ba8618539 100644
--- a/fftools/ffmpeg_videotoolbox.c
+++ b/fftools/ffmpeg_videotoolbox.c
@@ -29,6 +29,7 @@
typedef struct VTContext {
AVFrame *tmp_frame;
+ int log_once;
} VTContext;
char *videotoolbox_pixfmt;
@@ -44,6 +45,13 @@ static int videotoolbox_retrieve_data(AVCodecContext *s, AVFrame *frame)
int linesize[4] = { 0 };
int planes, ret, i;
+ if (frame->format == ist->hwaccel_output_format) {
+ av_log_once(s, AV_LOG_INFO, AV_LOG_TRACE, &vt->log_once,
+ "There is no video filter for videotoolbox pix_fmt now, remove the "
+ "-hwaccel_output_format option if video filter doesn't work\n");
+ return 0;
+ }
+
av_frame_unref(vt->tmp_frame);
switch (pixel_format) {