From 6856d81c6826e9698fe0154903f509d5a82917bb Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 30 Jul 2014 02:21:35 +0200 Subject: stream: hack-fix rtmp-level seeking This didn't work, because the timebase was wrong. According to the ffmpeg doxygen, if the stream index is -1 (which is what we used), the timebase is AV_TIME_BASE. But this didn't work, and it really expected the stream's timebase. Quite "surprising", since this feature (avio_seek_time) is used by rtmp only. Fixing this properly is too hard, so hack-fix our way around it. STREAM_CTRL_SEEK_TO_TIME is also used by DVD/BD, so a new STREAM_CTRL_AVSEEK is added. We simply pass-through the request verbatim. --- stream/stream.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 344e8b55ef..2cd3d9f5fa 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -101,6 +101,7 @@ enum stream_ctrl { STREAM_CTRL_TV_LAST_CHAN, STREAM_CTRL_DVB_SET_CHANNEL, STREAM_CTRL_DVB_STEP_CHANNEL, + STREAM_CTRL_AVSEEK, }; struct stream_lang_req { @@ -120,6 +121,13 @@ struct stream_dvd_info_req { #define TV_COLOR_SATURATION 3 #define TV_COLOR_CONTRAST 4 +// for STREAM_CTRL_AVSEEK +struct stream_avseek { + int stream_index; + int64_t timestamp; + int flags; +}; + struct stream; typedef struct stream_info_st { const char *name; -- cgit v1.2.3