diff options
author | Max Kellermann <max@duempel.org> | 2008-10-30 19:02:38 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-30 19:02:38 +0100 |
commit | 048d62a6286ca5485f1b84bf9a181965daf698c7 (patch) | |
tree | acd6571eb4b8791aed4a068b1ad33d670dc62f44 | |
parent | cd7a7204268167e8bd2d7c7678ce603096b2a4e2 (diff) | |
download | mpd-048d62a6286ca5485f1b84bf9a181965daf698c7.tar.gz mpd-048d62a6286ca5485f1b84bf9a181965daf698c7.tar.xz mpd-048d62a6286ca5485f1b84bf9a181965daf698c7.zip |
ffmpeg: report seek errors to MPD
The decoder API provides the function decoder_seek_error() to report
seek errors. Use this function instead of logging the error.
-rw-r--r-- | src/decoder/ffmpeg_plugin.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c index 7bb29fedc..7c8f81a7a 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -249,11 +249,10 @@ ffmpeg_decode_internal(BasePtrs *base) if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { current = decoder_seek_where(decoder) * AV_TIME_BASE; - if (av_seek_frame(pFormatCtx, -1, current , 0) < 0) { - WARNING("seek to %d failed\n", current); - } - - decoder_command_finished(decoder); + if (av_seek_frame(pFormatCtx, -1, current, 0) < 0) + decoder_seek_error(decoder); + else + decoder_command_finished(decoder); } if (av_read_frame(pFormatCtx, &packet) >= 0) { |