diff options
author | wm4 <wm4@nowhere> | 2015-10-17 14:27:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-17 14:27:55 +0200 |
commit | 9ca312b4b1d8ccd2c3e28527b5a02dd27d911186 (patch) | |
tree | cdd1d5e0444ab834cb8404f7208fb79875e6df8f /demux | |
parent | d27d91715f4f5b032d7ba551af7c346fb756a0db (diff) |
demux: remove demux_add_packet() return value
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 8 | ||||
-rw-r--r-- | demux/demux.h | 2 | ||||
-rw-r--r-- | demux/demux_subreader.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/demux/demux.c b/demux/demux.c index e094d23222..7ca3835388 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -307,13 +307,12 @@ const char *stream_type_name(enum stream_type type) } } -// Returns the same value as demuxer->fill_buffer: 1 ok, 0 EOF/not selected. -int demux_add_packet(struct sh_stream *stream, demux_packet_t *dp) +void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp) { struct demux_stream *ds = stream ? stream->ds : NULL; if (!dp || !ds) { talloc_free(dp); - return 0; + return; } struct demux_internal *in = ds->in; pthread_mutex_lock(&in->lock); @@ -330,7 +329,7 @@ int demux_add_packet(struct sh_stream *stream, demux_packet_t *dp) if (!ds->selected || in->seeking || drop) { pthread_mutex_unlock(&in->lock); talloc_free(dp); - return 0; + return; } dp->stream = stream->index; @@ -371,7 +370,6 @@ int demux_add_packet(struct sh_stream *stream, demux_packet_t *dp) ds->in->wakeup_cb(ds->in->wakeup_cb_ctx); pthread_cond_signal(&in->wakeup); pthread_mutex_unlock(&in->lock); - return 1; } // Returns true if there was "progress" (lock was released temporarily). diff --git a/demux/demux.h b/demux/demux.h index 7e4dcea5d0..7823d50233 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -242,7 +242,7 @@ typedef struct { void free_demuxer(struct demuxer *demuxer); void free_demuxer_and_stream(struct demuxer *demuxer); -int demux_add_packet(struct sh_stream *stream, demux_packet_t *dp); +void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp); struct demux_packet *demux_read_packet(struct sh_stream *sh); int demux_read_packet_async(struct sh_stream *sh, struct demux_packet **out_pkt); diff --git a/demux/demux_subreader.c b/demux/demux_subreader.c index b84f766b4a..ecceb5d13d 100644 --- a/demux/demux_subreader.c +++ b/demux/demux_subreader.c @@ -804,7 +804,9 @@ static int d_fill_buffer(struct demuxer *demuxer) struct priv *p = demuxer->priv; struct demux_packet *dp = demux_packet_list_fill(p->pkts, p->num_pkts, &p->current); - return demux_add_packet(p->sh, dp); + int have_packet = !!dp; + demux_add_packet(p->sh, dp); + return have_packet; } static void d_seek(struct demuxer *demuxer, double secs, int flags) |