Commit 724a59aa authored by Max Kellermann's avatar Max Kellermann

decoder/ffmpeg: don't require key frame for seeking

Use flag AV_TIME_BASE.
parent 42d8c298
...@@ -4,6 +4,7 @@ ver 0.16.5 (2010/??/??) ...@@ -4,6 +4,7 @@ ver 0.16.5 (2010/??/??)
- rewind: reduce heap usage - rewind: reduce heap usage
* decoder: * decoder:
- ffmpeg: higher precision timestamps - ffmpeg: higher precision timestamps
- ffmpeg: don't require key frame for seeking
ver 0.16.4 (2011/09/01) ver 0.16.4 (2011/09/01)
......
...@@ -447,7 +447,8 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input) ...@@ -447,7 +447,8 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
int64_t where = int64_t where =
decoder_seek_where(decoder) * AV_TIME_BASE; decoder_seek_where(decoder) * AV_TIME_BASE;
if (av_seek_frame(format_context, -1, where, 0) < 0) if (av_seek_frame(format_context, -1, where,
AV_TIME_BASE) < 0)
decoder_seek_error(decoder); decoder_seek_error(decoder);
else else
decoder_command_finished(decoder); decoder_command_finished(decoder);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment