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.
This commit is contained in:
@@ -249,10 +249,9 @@ ffmpeg_decode_internal(BasePtrs *base)
|
|||||||
if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) {
|
if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) {
|
||||||
current = decoder_seek_where(decoder) * AV_TIME_BASE;
|
current = decoder_seek_where(decoder) * AV_TIME_BASE;
|
||||||
|
|
||||||
if (av_seek_frame(pFormatCtx, -1, current , 0) < 0) {
|
if (av_seek_frame(pFormatCtx, -1, current, 0) < 0)
|
||||||
WARNING("seek to %d failed\n", current);
|
decoder_seek_error(decoder);
|
||||||
}
|
else
|
||||||
|
|
||||||
decoder_command_finished(decoder);
|
decoder_command_finished(decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user