Skip to content

Commit

Permalink
Merge pull request microsoft#156 from Microsoft/dcarpente/av_seek_flag
Browse files Browse the repository at this point in the history
added AVSEEK_FLAG_BACKWARD flag to av_seek_frame, also see issue microsoft#151
  • Loading branch information
Gilles Khouzam authored Jul 19, 2017
2 parents f03bbb2 + a26f569 commit da5c93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FFmpegInterop/Source/FFmpegInteropMSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ void FFmpegInteropMSS::OnStarting(MediaStreamSource ^sender, MediaStreamSourceSt
// Convert TimeSpan unit to AV_TIME_BASE
int64_t seekTarget = static_cast<int64_t>(request->StartPosition->Value.Duration / (av_q2d(avFormatCtx->streams[streamIndex]->time_base) * 10000000));

if (av_seek_frame(avFormatCtx, streamIndex, seekTarget, 0) < 0)
if (av_seek_frame(avFormatCtx, streamIndex, seekTarget, AVSEEK_FLAG_BACKWARD) < 0)
{
DebugMessage(L" - ### Error while seeking\n");
}
Expand Down

0 comments on commit da5c93b

Please sign in to comment.