[MPlayer-cvslog] r27301 - in trunk/libmpdemux: demux_asf.c demux_real.c demux_viv.c demuxer.h video.c

reimar subversion at mplayerhq.hu
Wed Jul 16 18:18:25 CEST 2008


Author: reimar
Date: Wed Jul 16 18:18:25 2008
New Revision: 27301

Log:
Move duplicate FF_INPUT_BUFFER_PADDING_SIZE handling into demuxer.h


Modified:
   trunk/libmpdemux/demux_asf.c
   trunk/libmpdemux/demux_real.c
   trunk/libmpdemux/demux_viv.c
   trunk/libmpdemux/demuxer.h
   trunk/libmpdemux/video.c

Modified: trunk/libmpdemux/demux_asf.c
==============================================================================
--- trunk/libmpdemux/demux_asf.c	(original)
+++ trunk/libmpdemux/demux_asf.c	Wed Jul 16 18:18:25 2008
@@ -79,13 +79,6 @@ static void init_priv (struct asf_priv* 
   asf->vid_ext_frame_index=-1;
 }
 
-#ifdef USE_LIBAVCODEC
-#include "libavcodec/avcodec.h"
-#else
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-#endif
-
-
 static void demux_asf_append_to_packet(demux_packet_t* dp,unsigned char *data,int len,int offs)
 {
   if(dp->len!=offs && offs!=-1) mp_msg(MSGT_DEMUX,MSGL_V,"warning! fragment.len=%d BUT next fragment offset=%d  \n",dp->len,offs);

Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	(original)
+++ trunk/libmpdemux/demux_real.c	Wed Jul 16 18:18:25 2008
@@ -33,12 +33,6 @@ Video codecs: (supported by RealPlayer8 
 #include "demuxer.h"
 #include "stheader.h"
 
-#ifdef USE_LIBAVCODEC
-#include "libavcodec/avcodec.h"
-#else
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-#endif
-
 //#define mp_dbg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args )
 
 #define MKTAG(a, b, c, d) (a | (b << 8) | (c << 16) | (d << 24))

Modified: trunk/libmpdemux/demux_viv.c
==============================================================================
--- trunk/libmpdemux/demux_viv.c	(original)
+++ trunk/libmpdemux/demux_viv.c	Wed Jul 16 18:18:25 2008
@@ -14,12 +14,6 @@
 #include "demuxer.h"
 #include "stheader.h"
 
-#ifdef USE_LIBAVCODEC
-#include "libavcodec/avcodec.h"
-#else
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-#endif
-
 /* parameters ! */
 int vivo_param_version = -1;
 char *vivo_param_acodec = NULL;

Modified: trunk/libmpdemux/demuxer.h
==============================================================================
--- trunk/libmpdemux/demuxer.h	(original)
+++ trunk/libmpdemux/demuxer.h	Wed Jul 16 18:18:25 2008
@@ -93,6 +93,12 @@
 #define SEEK_ABSOLUTE (1 << 0)
 #define SEEK_FACTOR   (1 << 1)
 
+#ifdef USE_LIBAVCODEC
+#include "libavcodec/avcodec.h"
+#else
+#define FF_INPUT_BUFFER_PADDING_SIZE 8
+#endif
+
 // Holds one packet/frame/whatever
 typedef struct demux_packet_st {
   int len;
@@ -243,7 +249,7 @@ static inline demux_packet_t* new_demux_
   dp->refcount=1;
   dp->master=NULL;
   dp->buffer=NULL;
-  if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + 8)))
+  if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + FF_INPUT_BUFFER_PADDING_SIZE)))
     memset(dp->buffer + len, 0, 8);
   else
     dp->len = 0;

Modified: trunk/libmpdemux/video.c
==============================================================================
--- trunk/libmpdemux/video.c	(original)
+++ trunk/libmpdemux/video.c	Wed Jul 16 18:18:25 2008
@@ -22,12 +22,6 @@
 /* sub_cc (closed captions)*/
 #include "sub_cc.h"
 
-#ifdef USE_LIBAVCODEC
-#include "libavcodec/avcodec.h"
-#else
-#define FF_INPUT_BUFFER_PADDING_SIZE 8
-#endif
-
 /* biCompression constant */
 #define BI_RGB        0L
 



More information about the MPlayer-cvslog mailing list