diff options
Diffstat (limited to 'src/demuxers/demux_ts.c')
-rw-r--r-- | src/demuxers/demux_ts.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index d2f54bd5f..bc614bf06 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ts.c,v 1.44 2002/05/17 21:24:10 miguelfreitas Exp $ + * $Id: demux_ts.c,v 1.45 2002/05/21 00:17:57 tmattern Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -1360,7 +1360,7 @@ static int demux_ts_open(demux_plugin_t *this_gen, input_plugin_t *input, return DEMUX_CAN_HANDLE; } -static void demux_ts_start(demux_plugin_t *this_gen, +static int demux_ts_start(demux_plugin_t *this_gen, fifo_buffer_t *video_fifo, fifo_buffer_t *audio_fifo, off_t start_pos, int start_time) { @@ -1368,6 +1368,7 @@ static void demux_ts_start(demux_plugin_t *this_gen, demux_ts *this = (demux_ts *)this_gen; buf_element_t *buf; int err; + int status; pthread_mutex_lock( &this->mutex ); @@ -1420,14 +1421,20 @@ static void demux_ts_start(demux_plugin_t *this_gen, else { xine_flush_engine(this->xine); } + + /* this->status is saved because we can be interrupted between + * pthread_mutex_unlock and return + */ + status = this->status; pthread_mutex_unlock( &this->mutex ); + return status; } -static void demux_ts_seek (demux_plugin_t *this_gen, +static int demux_ts_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time) { demux_ts *this = (demux_ts *)this_gen; - demux_ts_start (this_gen, this->video_fifo, this->audio_fifo, + return demux_ts_start (this_gen, this->video_fifo, this->audio_fifo, start_pos, start_time); } |