[MPlayer-cvslog] CVS: main/libmpdemux demux_ogg.c,1.88,1.89
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Wed Mar 8 23:23:23 CET 2006
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv9249
Modified Files:
demux_ogg.c
Log Message:
in demux_ogg_read_packet initialize data to whole packet, reduces code and
fixes missing initialization in else + header packet case.
Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- demux_ogg.c 17 Feb 2006 01:57:40 -0000 1.88
+++ demux_ogg.c 8 Mar 2006 22:23:21 -0000 1.89
@@ -330,13 +330,12 @@
}
static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,void *context,float* pts,int* flags, int samplesize) {
- unsigned char* data;
+ unsigned char* data = pack->packet;
*pts = 0;
*flags = 0;
if(os->vorbis) {
- data = pack->packet;
if(*pack->packet & PACKET_TYPE_HEADER)
os->hdr_packets++;
else if (context )
@@ -356,11 +355,10 @@
os->lastpos = pack->granulepos;
}
} else if (os->speex) {
- data = pack->packet;
+ // whole packet (default)
# ifdef HAVE_OGGTHEORA
} else if (os->theora) {
/* we pass complete packets to theora, mustn't strip the header! */
- data = pack->packet;
os->lastsize = 1;
/* header packets beginn on 1-bit: thus check (*data&0x80). We don't
@@ -389,7 +387,6 @@
# ifdef HAVE_FLAC
} else if (os->flac) {
/* we pass complete packets to flac, mustn't strip the header! */
- data = pack->packet;
#endif /* HAVE_FLAC */
} else {
if(*pack->packet & PACKET_TYPE_HEADER)
More information about the MPlayer-cvslog
mailing list