summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Galin <[email protected]>2020-07-13 16:08:56 +0100
committerScott <[email protected]>2020-07-20 16:56:43 +0100
commit8cfd3a28a61581f3a669cb41d82fd72399a50ce0 (patch)
tree7bd374a967d9a86920b3568ed5dcc78bef229448
parentbdee4bef65609aea9f56e0a87ad3d713f62033a7 (diff)
qsv: fix gui issue with when av_frame is null
-rw-r--r--libhb/avfilter.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libhb/avfilter.c b/libhb/avfilter.c
index 61de084b4..5b8b30d28 100644
--- a/libhb/avfilter.c
+++ b/libhb/avfilter.c
@@ -237,7 +237,8 @@ void hb_avfilter_alias_close( hb_filter_object_t * filter )
static hb_buffer_t* filterFrame( hb_filter_private_t * pv, hb_buffer_t * in )
{
hb_buffer_list_t list;
- hb_buffer_t * buf, * next;
+ hb_buffer_t * buf = NULL, * next = NULL;
+ int av_frame_is_not_null = 1; // TODO: find the reason for emply input av_frame for ffmpeg filters
#if HB_PROJECT_FEATURE_QSV
mfxFrameSurface1 *surface = NULL;
// We need to keep surface pointer because hb_avfilter_add_buf set it to 0 after in ffmpeg call
@@ -245,9 +246,16 @@ static hb_buffer_t* filterFrame( hb_filter_private_t * pv, hb_buffer_t * in )
{
surface = (mfxFrameSurface1 *)in->qsv_details.frame->data[3];
}
+ else
+ {
+ av_frame_is_not_null= 0;
+ }
#endif
- hb_avfilter_add_buf(pv->graph, in);
- buf = hb_avfilter_get_buf(pv->graph);
+ if (av_frame_is_not_null)
+ {
+ hb_avfilter_add_buf(pv->graph, in);
+ buf = hb_avfilter_get_buf(pv->graph);
+ }
while (buf != NULL)
{
hb_buffer_list_append(&pv->list, buf);