[MPlayer-cvslog] r29812 - trunk/libmpdemux/demuxer.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Nov 2 09:42:31 CET 2009
On Mon, Nov 02, 2009 at 02:40:10AM +0100, uau wrote:
> Author: uau
> Date: Mon Nov 2 02:40:09 2009
> New Revision: 29812
>
> Log:
> demuxer.c: Add initialization missing from previous commit
>
> Reimar's previous commit ("Unbreak the demuxer-specific code in
> video.c with e.g.") added the new field "non_interleaved" in
> demux_stream structs, but this field was not initialized anywhere.
> Under suitable circumstances this could cause a "Too many
> video/audio packets in the buffer" error and failing playback. Fix
> the problem by cleaning up the code that creates new instances of the
> struct. Now fields will be initialized to 0 by default.
>
> Modified:
> trunk/libmpdemux/demuxer.c
>
> Modified: trunk/libmpdemux/demuxer.c
> ==============================================================================
> --- trunk/libmpdemux/demuxer.c Mon Nov 2 01:11:30 2009 (r29811)
> +++ trunk/libmpdemux/demuxer.c Mon Nov 2 02:40:09 2009 (r29812)
> @@ -187,27 +187,11 @@ void free_demuxer_stream(demux_stream_t
> demux_stream_t *new_demuxer_stream(struct demuxer_st *demuxer, int id)
> {
> demux_stream_t *ds = malloc(sizeof(demux_stream_t));
> - ds->buffer_pos = ds->buffer_size = 0;
> - ds->buffer = NULL;
> - ds->pts = 0;
> - ds->pts_bytes = 0;
> - ds->eof = 0;
> - ds->pos = 0;
> - ds->dpos = 0;
> - ds->pack_no = 0;
> -
> - ds->packs = 0;
> - ds->bytes = 0;
> - ds->first = ds->last = ds->current = NULL;
> - ds->id = id;
> - ds->demuxer = demuxer;
> -
> - ds->asf_seq = -1;
Thanks though I think calloc + leaving these three lines in would have
been simpler and possibly even faster (not that it matters).
More information about the MPlayer-cvslog
mailing list