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

Use flag AV_TIME_BASE.
This commit is contained in:
Max Kellermann 2011-09-15 21:32:29 +02:00
parent 42d8c2981f
commit 724a59aaf7
2 changed files with 3 additions and 1 deletions

1
NEWS
View File

@ -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)

View File

@ -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);