Skip to content

Commit

Permalink
recreate vtb session after seek to avoid output picture error
Browse files Browse the repository at this point in the history
  • Loading branch information
zccicy committed Jan 27, 2015
1 parent 2019d20 commit 858dd83
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,17 @@ int videotoolbox_decode_video_internal(VideoToolBoxContext* context, AVCodecCont
}

if (context->refresh_request) {

while (context->m_queue_depth > 0) {
SortQueuePop(context);
}

if(context->m_vt_session) {
VTDecompressionSessionInvalidate(context->m_vt_session);
CFRelease(context->m_vt_session);
}

CreateVTBSession(context, context->ffp->is->viddec.avctx->width, context->ffp->is->viddec.avctx->height, context->m_fmt_desc);
context->refresh_request = false;
}

Expand Down

0 comments on commit 858dd83

Please sign in to comment.