mirror of
https://github.com/mpv-player/mpv
synced 2025-05-13 08:49:55 +02:00
demux_lavf: implement DEMUXER_CTRL_RESYNC
This makes -chapter work with stream_dvd by telling ffmpeg to flush its internal buffers after a stream_dvd seek.
This commit is contained in:
parent
413b2e3b0f
commit
5a412bfa09
@ -1066,6 +1066,21 @@ redo:
|
|||||||
priv->cur_program = prog->progid = program->id;
|
priv->cur_program = prog->progid = program->id;
|
||||||
return DEMUXER_CTRL_OK;
|
return DEMUXER_CTRL_OK;
|
||||||
}
|
}
|
||||||
|
case DEMUXER_CTRL_RESYNC:
|
||||||
|
/* NOTE:
|
||||||
|
*
|
||||||
|
* We actually want to call ff_read_frame_flush() here, but it is
|
||||||
|
* internal.
|
||||||
|
*
|
||||||
|
* This function call seems to do the same for now.
|
||||||
|
*
|
||||||
|
* Once ff_read_frame_flush() is exported in some way, change this to
|
||||||
|
* call the new API instead of relying on av_seek_frame() to do this
|
||||||
|
* for us.
|
||||||
|
*/
|
||||||
|
av_seek_frame(priv->avfc, 0, avio_tell(priv->avfc->pb),
|
||||||
|
AVSEEK_FLAG_BYTE);
|
||||||
|
return DEMUXER_CTRL_OK;
|
||||||
default:
|
default:
|
||||||
return DEMUXER_CTRL_NOTIMPL;
|
return DEMUXER_CTRL_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user