[MPlayer-cvslog] r26411 - trunk/libmpdemux/demuxer.c

Michael Niedermayer michaelni at gmx.at
Wed Jun 4 21:29:19 CEST 2008


On Wed, Jun 04, 2008 at 05:34:13PM +0200, Luca Barbato wrote:
> Reimar Döffinger wrote:
> > On Sat, Apr 12, 2008 at 05:51:08PM +0200, uau wrote:
> >> Author: uau
> >> Date: Sat Apr 12 17:51:08 2008
> >> New Revision: 26411
> >>
> >> Log:
> >> Reindent demuxer.c
> > 
> > This is not only a reindentation,
> 
> It is, at least if you consider reindent as "do what indent does"

@@ -357,11 +376,8 @@
 }
 
 
-void ds_add_packet(demux_stream_t *ds,demux_packet_t* dp){
-//    demux_packet_t* dp=new_demux_packet(len);
-//    stream_read(stream,dp->buffer,len);
-//    dp->pts=pts; //(float)pts/90000.0f;
-//    dp->pos=pos;
+void ds_add_packet(demux_stream_t *ds, demux_packet_t *dp)
+{
     // append packet to DS stream:
     ++ds->packs;
     ds->bytes+=dp->len;

.....
     resize_demux_packet(dp, len);
-    dp->pts=pts; //(float)pts/90000.0f;
+    dp->pts = pts;
     dp->pos=pos;
     dp->flags=flags;
     // append packet to DS stream:
.....
-int demux_fill_buffer(demuxer_t *demux,demux_stream_t *ds){
+int demux_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
+{
   // Note: parameter 'ds' can be NULL!
-//  printf("demux->type=%d\n",demux->type);
   return demux->desc->fill_buffer(demux, ds);
 }
 
.....
       --ds->packs;
-      return 1; //ds->buffer_size;
+            return 1;
     }
.....
@@ -689,11 +749,9 @@
 */
 
 static demuxer_t* demux_open_stream(stream_t *stream, int file_format,
-                    int force, int audio_id, int video_id, int dvdsub_id,
-                    char* filename) {
-
-//int file_format=(*file_format_ptr);
-
+                                    int force, int audio_id, int video_id,
+                                    int dvdsub_id, char *filename)
+{
 demuxer_t *demuxer=NULL;
 
 sh_video_t *sh_video=NULL;
@@ -702,12 +760,12 @@
 int fformat = 0;
 int i;
 
-//printf("demux_open(%p,%d,%d,%d,%d)  \n",stream,file_format,audio_id,video_id,dvdsub_id);
-
 // If somebody requested a demuxer check it
 if (file_format) {
   if ((demuxer_desc = get_demuxer_desc_from_type(file_format
.....
-    demuxer->stream->eof=0; // clear eof flag
+    demuxer->stream->eof = 0;
     demuxer->video->eof=0;
     demuxer->audio->eof=0;
 
-#if 0
-    if(sh_audio) sh_audio->timer=sh_video->timer;
-#else
-    if(sh_video) sh_video->timer=0; // !!!!!!
-#endif
+    if (sh_video)
+        sh_video->timer = 0;    // !!!!!!
 
     if(flags & SEEK_ABSOLUTE)
       pts = 0.0f;

----------------------------------------
These remove comments, remove outcommented code, ...
this definitly is not what indent does and its just what i quickly spotted

And thats why such commits are so bad and why we all complain, they are a
nightmare to review, you missed the things above, others missed them too.
What if there where security related changes? Intentionally placed
buffer overflows or some, send /etc/shadow to badguy at badplace.com?
All code that goes into svn has to be reviewed or mplayer will become a
time bomb. Its trivial to get a svn account if one wanted to do something
nasty, reviews are the only way to avoid such issues.


Also the very next commit from uoti is a shorter example of
a mix of cosmetics and functional changes

Besides demuxer.c is not maintained by uoti ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20080604/33d4d8cc/attachment.pgp>


More information about the MPlayer-cvslog mailing list