Skip to content

Commit

Permalink
VAAPI: Fix intermittent VPP deinterlacer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Mar 17, 2020
1 parent a74700c commit b214da2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/opengl/mythvaapiinterop.cpp
Expand Up @@ -451,7 +451,8 @@ VASurfaceID MythVAAPIInterop::Deinterlace(VideoFrame *Frame, VASurfaceID Current
sourceframe->top_field_first = Frame->interlaced_reversed ? !Frame->top_field_first : Frame->top_field_first;
sourceframe->interlaced_frame = 1;
sourceframe->data[3] = Frame->buf;
sourceframe->buf[0] = av_buffer_ref(reinterpret_cast<AVBufferRef*>(Frame->priv[0]));
AVBufferRef* buffer = reinterpret_cast<AVBufferRef*>(Frame->priv[0]);
sourceframe->buf[0] = buffer ? av_buffer_ref(buffer) : nullptr;
sourceframe->width = m_filterWidth;
sourceframe->height = m_filterHeight;
sourceframe->format = AV_PIX_FMT_VAAPI;
Expand Down

0 comments on commit b214da2

Please sign in to comment.