changeset 17906:20aca9baf5d8

passing pts through the filter layer (lets see if pts or cola comes out at the end)
author michael
date Tue, 21 Mar 2006 21:26:42 +0000
parents 433494f162a9
children d8a6e0c22f0c
files libmpcodecs/dec_video.c libmpcodecs/ve_divx4.c libmpcodecs/ve_lavc.c libmpcodecs/ve_libdv.c libmpcodecs/ve_nuv.c libmpcodecs/ve_qtvideo.c libmpcodecs/ve_raw.c libmpcodecs/ve_vfw.c libmpcodecs/ve_x264.c libmpcodecs/ve_xvid.c libmpcodecs/ve_xvid4.c libmpcodecs/vf.c libmpcodecs/vf.h libmpcodecs/vf_1bpp.c libmpcodecs/vf_2xsai.c libmpcodecs/vf_bmovl.c libmpcodecs/vf_boxblur.c libmpcodecs/vf_crop.c libmpcodecs/vf_cropdetect.c libmpcodecs/vf_decimate.c libmpcodecs/vf_delogo.c libmpcodecs/vf_denoise3d.c libmpcodecs/vf_detc.c libmpcodecs/vf_dint.c libmpcodecs/vf_divtc.c libmpcodecs/vf_down3dright.c libmpcodecs/vf_eq.c libmpcodecs/vf_eq2.c libmpcodecs/vf_expand.c libmpcodecs/vf_fame.c libmpcodecs/vf_field.c libmpcodecs/vf_fil.c libmpcodecs/vf_filmdint.c libmpcodecs/vf_flip.c libmpcodecs/vf_framestep.c libmpcodecs/vf_fspp.c libmpcodecs/vf_halfpack.c libmpcodecs/vf_harddup.c libmpcodecs/vf_hqdn3d.c libmpcodecs/vf_hue.c libmpcodecs/vf_il.c libmpcodecs/vf_ilpack.c libmpcodecs/vf_ivtc.c libmpcodecs/vf_kerndeint.c libmpcodecs/vf_lavc.c libmpcodecs/vf_lavcdeint.c libmpcodecs/vf_mirror.c libmpcodecs/vf_noise.c libmpcodecs/vf_palette.c libmpcodecs/vf_perspective.c libmpcodecs/vf_phase.c libmpcodecs/vf_pp.c libmpcodecs/vf_pp7.c libmpcodecs/vf_pullup.c libmpcodecs/vf_qp.c libmpcodecs/vf_rectangle.c libmpcodecs/vf_remove_logo.c libmpcodecs/vf_rgb2bgr.c libmpcodecs/vf_rgbtest.c libmpcodecs/vf_rotate.c libmpcodecs/vf_sab.c libmpcodecs/vf_scale.c libmpcodecs/vf_screenshot.c libmpcodecs/vf_smartblur.c libmpcodecs/vf_softpulldown.c libmpcodecs/vf_softskip.c libmpcodecs/vf_spp.c libmpcodecs/vf_swapuv.c libmpcodecs/vf_telecine.c libmpcodecs/vf_test.c libmpcodecs/vf_tfields.c libmpcodecs/vf_tile.c libmpcodecs/vf_tinterlace.c libmpcodecs/vf_unsharp.c libmpcodecs/vf_uspp.c libmpcodecs/vf_vo.c libmpcodecs/vf_yuvcsp.c libmpcodecs/vf_yuy2.c libmpcodecs/vf_yvu9.c libmpcodecs/vf_zrmjpeg.c
diffstat 80 files changed, 191 insertions(+), 180 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/dec_video.c	Tue Mar 21 21:26:42 2006 +0000
@@ -336,7 +336,7 @@
 
 //vo_draw_image(video_out,mpi);
 vf=sh_video->vfilter;
-ret = vf->put_image(vf,mpi); // apply video filters and call the leaf vo/ve
+ret = vf->put_image(vf,mpi, MP_NOPTS_VALUE); // apply video filters and call the leaf vo/ve
 if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
 
     t2=GetTimer()-t2;
--- a/libmpcodecs/ve_divx4.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_divx4.c	Tue Mar 21 21:26:42 2006 +0000
@@ -387,7 +387,7 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     ENC_RESULT enc_result;
     vf->priv->enc_frame.image=mpi->planes[0];
     vf->priv->enc_frame.bitstream=mux_v->buffer;
--- a/libmpcodecs/ve_lavc.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_lavc.c	Tue Mar 21 21:26:42 2006 +0000
@@ -338,7 +338,7 @@
 #define FF_QP2LAMBDA 1
 #endif
 
-static int encode_frame(struct vf_instance_s* vf, AVFrame *pic);
+static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts);
 
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
@@ -782,7 +782,7 @@
     switch(request){
         case VFCTRL_FLUSH_FRAMES:
             if(vf->priv->codec->capabilities & CODEC_CAP_DELAY)
-                while(encode_frame(vf, NULL) > 0);
+                while(encode_frame(vf, NULL, MP_NOPTS_VALUE) > 0);
             return CONTROL_TRUE;
         default:
             return CONTROL_UNKNOWN;
@@ -826,7 +826,7 @@
     return -10.0*log(d)/log(10);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     AVFrame *pic= vf->priv->pic;
 
     pic->data[0]=mpi->planes[0];
@@ -848,13 +848,17 @@
     }
 #endif
 
-    return (encode_frame(vf, pic) >= 0);
+    return (encode_frame(vf, pic, pts) >= 0);
 }
 
-static int encode_frame(struct vf_instance_s* vf, AVFrame *pic){
+static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){
     const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'};
     int out_size;
 
+    if(pic){
+        pic->opaque= malloc(sizeof(pts));
+        memcpy(pic->opaque, &pts, sizeof(pts));
+    }
 	out_size = avcodec_encode_video(lavc_venc_context, mux_v->buffer, mux_v->buffer_size,
 	    pic);
 
@@ -863,7 +867,10 @@
         return 0;
     }
            
-    muxer_write_chunk(mux_v,out_size,lavc_venc_context->coded_frame->key_frame?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    muxer_write_chunk(mux_v,out_size,lavc_venc_context->coded_frame->key_frame?0x10:0, 
+                      pts, 
+                      *(double*)lavc_venc_context->coded_frame->opaque);
+    free(lavc_venc_context->coded_frame->opaque);
         
 #if LIBAVCODEC_BUILD >= 4643
     /* store psnr / pict size / type / qscale */
--- a/libmpcodecs/ve_libdv.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_libdv.c	Tue Mar 21 21:26:42 2006 +0000
@@ -71,13 +71,13 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 
     dv_encode_full_frame(vf->priv->enc, mpi->planes, 
 	(mpi->flags&MP_IMGFLAG_YUV) ? e_dv_color_yuv : e_dv_color_rgb,
 	mux_v->buffer);
 
-    muxer_write_chunk(mux_v, 480 * (vf->priv->enc->isPAL ? 300 : 250) , 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    muxer_write_chunk(mux_v, 480 * (vf->priv->enc->isPAL ? 300 : 250) , 0x10, pts, pts);
     return 1;
 }
 
--- a/libmpcodecs/ve_nuv.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_nuv.c	Tue Mar 21 21:26:42 2006 +0000
@@ -97,7 +97,7 @@
   return 0;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
   struct rtframeheader* ench = (struct rtframeheader*)vf->priv->buffer;
   uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE;
   uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE;
@@ -175,7 +175,7 @@
   ench->packetlength = len;
   le2me_rtframeheader(ench);
   mux_v->buffer=(void*)ench;
-  muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+  muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts);
   return 1;
 }
 
--- a/libmpcodecs/ve_qtvideo.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_qtvideo.c	Tue Mar 21 21:26:42 2006 +0000
@@ -172,7 +172,7 @@
 
 static int codec_inited = 0;
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 
     OSErr cres;
     long framesizemax;
--- a/libmpcodecs/ve_raw.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_raw.c	Tue Mar 21 21:26:42 2006 +0000
@@ -115,9 +115,9 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s *vf, mp_image_t *mpi) {
+static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts) {
     mux_v->buffer = mpi->planes[0];
-    muxer_write_chunk(mux_v, mpi->width*mpi->height*mux_v->bih->biBitCount/8, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    muxer_write_chunk(mux_v, mpi->width*mpi->height*mux_v->bih->biBitCount/8, 0x10, pts, pts);
     return 1;
 }
 
--- a/libmpcodecs/ve_vfw.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_vfw.c	Tue Mar 21 21:26:42 2006 +0000
@@ -238,12 +238,12 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     long flags=0;
     int ret;
 //    flip_upside_down(vo_image_ptr,vo_image_ptr,3*vo_w,vo_h); // dirty hack
     ret=vfw_encode_frame(mux_v->bih, mux_v->buffer, vfw_bih, mpi->planes[0], &flags, 10000);
-    muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags, pts, pts);
     return 1;
 }
 
--- a/libmpcodecs/ve_x264.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_x264.c	Tue Mar 21 21:26:42 2006 +0000
@@ -221,7 +221,7 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s *vf, mp_image_t *mpi);
+static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts);
 static int encode_frame(struct vf_instance_s *vf, x264_picture_t *pic_in);
 
 static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) {
@@ -474,7 +474,7 @@
     return 0;
 }
 
-static int put_image(struct vf_instance_s *vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts)
 {
     h264_module_t *mod=(h264_module_t*)vf->priv;
     int i;
--- a/libmpcodecs/ve_xvid.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_xvid.c	Tue Mar 21 21:26:42 2006 +0000
@@ -434,7 +434,7 @@
 }
 
 static int
-put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     XVID_ENC_STATS enc_stats;
     struct vf_priv_s *fp = vf->priv;
--- a/libmpcodecs/ve_xvid4.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/ve_xvid4.c	Tue Mar 21 21:26:42 2006 +0000
@@ -591,7 +591,7 @@
  *==========================================================================*/
 
 static int
-put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	int size;
 	xvid_enc_stats_t stats; 
--- a/libmpcodecs/vf.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf.c	Tue Mar 21 21:26:42 2006 +0000
@@ -630,8 +630,8 @@
     return flags;
 }
 
-int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi){
-    return vf->next->put_image(vf->next,mpi);
+int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts){
+    return vf->next->put_image(vf->next,mpi, pts);
 }
 
 void vf_next_draw_slice(struct vf_instance_s* vf,unsigned char** src, int * stride,int w, int h, int x, int y){
--- a/libmpcodecs/vf.h	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf.h	Tue Mar 21 21:26:42 2006 +0000
@@ -37,7 +37,7 @@
     void (*get_image)(struct vf_instance_s* vf,
         mp_image_t *mpi);
     int (*put_image)(struct vf_instance_s* vf,
-        mp_image_t *mpi);
+        mp_image_t *mpi, double pts);
     void (*start_slice)(struct vf_instance_s* vf,
         mp_image_t *mpi);
     void (*draw_slice)(struct vf_instance_s* vf,
@@ -78,6 +78,10 @@
 
 #include "vfcap.h"
 
+//FIXME this should be in a common header, but i dunno which
+#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
+
+
 // functions:
 void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
 mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
@@ -96,7 +100,7 @@
 	unsigned int flags, unsigned int outfmt);
 int vf_next_control(struct vf_instance_s* vf, int request, void* data);
 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
-int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi);
+int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts);
 void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
 
 vf_instance_t* append_filters(vf_instance_t* last);
--- a/libmpcodecs/vf_1bpp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_1bpp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -105,7 +105,7 @@
     }
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     
     // hope we'll get DR buffer:
@@ -151,7 +151,7 @@
 	return 0;
     }
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_2xsai.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_2xsai.c	Tue Mar 21 21:26:42 2006 +0000
@@ -318,7 +318,7 @@
     return vf_next_config(vf,2*width,2*height,2*d_width,2*d_height,flags,outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     // hope we'll get DR buffer:
@@ -330,7 +330,7 @@
 		  dmpi->planes[0], dmpi->stride[0],
 		  mpi->w, mpi->h, mpi->bpp/8);
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_bmovl.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_bmovl.c	Tue Mar 21 21:26:42 2006 +0000
@@ -199,7 +199,7 @@
 			
 
 static int
-put_image(struct vf_instance_s* vf, mp_image_t* mpi){
+put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){
 	int buf_x=0, buf_y=0, buf_pos=0;
 	int have, got, want;
 	int xpos=0, ypos=0, pos=0;
@@ -246,10 +246,10 @@
 			else if( strncmp(cmd,"OPAQUE",6)==0 ) vf->priv->opaque=TRUE;
 			else if( strncmp(cmd,"SHOW",  4)==0 ) vf->priv->hidden=FALSE;
 			else if( strncmp(cmd,"HIDE",  4)==0 ) vf->priv->hidden=TRUE;
-			else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi);
+			else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			else {
 			    mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Unknown command: '%s'. Ignoring.\n", cmd);
-			    return vf_next_put_image(vf, dmpi);
+			    return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			}
 
 			if(command == CMD_ALPHA) {
@@ -268,7 +268,7 @@
 			    buffer = malloc(imgw*imgh*pxsz);
 			    if(!buffer) {
 			    	mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Couldn't allocate temporary buffer! Skipping...\n\n");
-					return vf_next_put_image(vf, dmpi);
+					return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			    }
   				/* pipes/sockets might need multiple calls to read(): */
 			    want = (imgw*imgh*pxsz);
@@ -329,7 +329,7 @@
 					if( (imgx <= vf->priv->x2) && ( (imgx+imgw) >= vf->priv->x2) )
 						vf->priv->x2 = imgx;
 				}
-				return vf_next_put_image(vf, dmpi);
+				return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			}
 
 			for( buf_y=0 ; (buf_y < imgh) && (buf_y < (vf->priv->h-imgy)) ; buf_y++ ) {
@@ -387,7 +387,7 @@
 		}
     }
 
-	if(vf->priv->hidden) return vf_next_put_image(vf, dmpi);
+	if(vf->priv->hidden) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 
 	if(vf->priv->opaque) {	// Just copy buffer memory to screen
 		for( ypos=vf->priv->y1 ; ypos < vf->priv->y2 ; ypos++ ) {
@@ -439,7 +439,7 @@
 			} // for xpos
 		} // for ypos
 	} // if !opaque
-    return vf_next_put_image(vf, dmpi);
+    return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 } // put_image
 
 static int
--- a/libmpcodecs/vf_boxblur.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_boxblur.c	Tue Mar 21 21:26:42 2006 +0000
@@ -132,7 +132,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
 
@@ -156,7 +156,7 @@
 	vBlur(dmpi->planes[2], dmpi->planes[2], cw,ch, 
 		dmpi->stride[2], dmpi->stride[2], vf->priv->chromaParam.radius, vf->priv->chromaParam.power);
     
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_crop.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_crop.c	Tue Mar 21 21:26:42 2006 +0000
@@ -67,10 +67,10 @@
     return vf_next_config(vf,vf->priv->crop_w,vf->priv->crop_h,d_width,d_height,flags,outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     if (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)
-	return vf_next_put_image(vf,vf->dmpi);
+	return vf_next_put_image(vf,vf->dmpi, pts);
     dmpi=vf_get_image(vf->next,mpi->imgfmt,
 	MP_IMGTYPE_EXPORT, 0,
 	vf->priv->crop_w, vf->priv->crop_h);
@@ -91,7 +91,7 @@
     }
     dmpi->stride[0]=mpi->stride[0];
     dmpi->width=mpi->width;
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){
--- a/libmpcodecs/vf_cropdetect.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_cropdetect.c	Tue Mar 21 21:26:42 2006 +0000
@@ -55,7 +55,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     int bpp=mpi->bpp/8;
     int w,h,x,y,shrink_by;
@@ -135,7 +135,7 @@
 
 }
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int query_format(struct vf_instance_s* vf, unsigned int fmt) {
--- a/libmpcodecs/vf_decimate.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_decimate.c	Tue Mar 21 21:26:42 2006 +0000
@@ -110,7 +110,7 @@
 		new->w*(new->bpp/8), new->h, old->stride[0], new->stride[0]);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -143,7 +143,7 @@
 			mpi->chroma_width, mpi->chroma_height,
 			dmpi->stride[2], mpi->stride[2]);
 	}
-	return vf_next_put_image(vf, dmpi);
+	return vf_next_put_image(vf, dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf)
--- a/libmpcodecs/vf_delogo.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_delogo.c	Tue Mar 21 21:26:42 2006 +0000
@@ -147,7 +147,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
@@ -170,7 +170,7 @@
 
     vf_clone_mpi_attributes(dmpi, mpi);
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_denoise3d.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_denoise3d.c	Tue Mar 21 21:26:42 2006 +0000
@@ -114,7 +114,7 @@
 
 
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
         int W = mpi->w, H = mpi->h;
@@ -147,7 +147,7 @@
                 vf->priv->Coefs[3] + 256);
 
 	vf->priv->pmpi=dmpi; // save reference image
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_detc.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_detc.c	Tue Mar 21 21:26:42 2006 +0000
@@ -327,10 +327,10 @@
 	}
 
 	p->outframes++;
-	return vf_next_put_image(vf, dmpi);
+	return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	int ret=0;
 	mp_image_t *dmpi;
--- a/libmpcodecs/vf_dint.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_dint.c	Tue Mar 21 21:26:42 2006 +0000
@@ -62,7 +62,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
 }
 
-static int put_image (struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image (struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     char rrow0[MAXROWSIZE];
     char rrow1[MAXROWSIZE];
@@ -171,7 +171,7 @@
     }
     vf->priv->was_dint = 0;
 //    mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
-    return vf_next_put_image (vf, mpi);
+    return vf_next_put_image (vf, mpi, pts);
 }
 
 static int open (vf_instance_t *vf, char* args){
--- a/libmpcodecs/vf_divtc.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_divtc.c	Tue Mar 21 21:26:42 2006 +0000
@@ -235,7 +235,7 @@
    return m;
    }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
    {
    mp_image_t *dmpi, *tmpi=0;
    int n, m, f, newphase;
@@ -350,12 +350,12 @@
 	    imgop((void *)memcpy_pic, tmpi, mpi, 0);
 	    imgop(deghost_plane, tmpi, dmpi, p->deghost);
 	    imgop((void *)memcpy_pic, dmpi, mpi, 0);
-	    return vf_next_put_image(vf, tmpi);
+	    return vf_next_put_image(vf, tmpi, MP_NOPTS_VALUE);
 	    }
       }
 
    imgop((void *)memcpy_pic, dmpi, mpi, 0);
-   return vf_next_put_image(vf, dmpi);
+   return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
    }
 
 static int analyze(struct vf_priv_s *p)
--- a/libmpcodecs/vf_down3dright.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_down3dright.c	Tue Mar 21 21:26:42 2006 +0000
@@ -79,7 +79,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -93,7 +93,7 @@
 	toright(dmpi->planes, mpi->planes, dmpi->stride,
 		mpi->stride, mpi->w, mpi->h, vf->priv);
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int config(struct vf_instance_s* vf,
--- a/libmpcodecs/vf_eq.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_eq.c	Tue Mar 21 21:26:42 2006 +0000
@@ -116,7 +116,7 @@
 
 /* FIXME: add packed yuv version of process */
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -142,7 +142,7 @@
 			vf->priv->contrast);
 	}
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int control(struct vf_instance_s* vf, int request, void* data)
--- a/libmpcodecs/vf_eq2.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_eq2.c	Tue Mar 21 21:26:42 2006 +0000
@@ -224,7 +224,7 @@
 }
 
 static
-int put_image (vf_instance_t *vf, mp_image_t *src)
+int put_image (vf_instance_t *vf, mp_image_t *src, double pts)
 {
   unsigned      i;
   vf_eq2_t      *eq2;
@@ -264,7 +264,7 @@
     }
   }
 
-  return vf_next_put_image (vf, dst);
+  return vf_next_put_image (vf, dst, pts);
 }
 
 static
--- a/libmpcodecs/vf_expand.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_expand.c	Tue Mar 21 21:26:42 2006 +0000
@@ -329,7 +329,7 @@
     vf->priv->first_slice = 0;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
 	vf->dmpi=mpi->priv;
 	if(!vf->dmpi) { printf("Why do we get NULL \n"); return 0; }
@@ -340,7 +340,7 @@
 	// we've used DR, so we're ready...
 	if(!(mpi->flags&MP_IMGFLAG_PLANAR))
 	    vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
-	return vf_next_put_image(vf,vf->dmpi);
+	return vf_next_put_image(vf,vf->dmpi, pts);
     }
 
     // hope we'll get DR buffer:
@@ -372,7 +372,7 @@
 #ifdef OSD_SUPPORT
     if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
 #endif
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_fame.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_fame.c	Tue Mar 21 21:26:42 2006 +0000
@@ -45,7 +45,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     fame_yuv_t yuv;
     mp_image_t *dmpi;
     int out_size;
@@ -75,7 +75,7 @@
     
     dmpi->planes[0]=(void*) &vf->priv->pes;
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, MP_NOPTS_VALUE);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_field.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_field.c	Tue Mar 21 21:26:42 2006 +0000
@@ -22,7 +22,7 @@
     return vf_next_config(vf,width,height/2,d_width,d_height,flags,outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
 	MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
 	mpi->width, mpi->height/2);
@@ -40,7 +40,7 @@
     } else
 	vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
     
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_fil.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_fil.c	Tue Mar 21 21:26:42 2006 +0000
@@ -47,10 +47,10 @@
         (d_width*vf->priv->stridefactor)>>1, 2*d_height/vf->priv->stridefactor, flags, outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     if(mpi->flags&MP_IMGFLAG_DIRECT){
 	// we've used DR, so we're ready...
-	return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
+	return vf_next_put_image(vf,(mp_image_t*)mpi->priv, pts);
     }
 
     vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
@@ -68,7 +68,7 @@
     } else
 	vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
     
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_filmdint.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_filmdint.c	Tue Mar 21 21:26:42 2006 +0000
@@ -1137,7 +1137,7 @@
 
 #define ITOC(X) (!(X) ? ' ' : (X) + ((X)>9 ? 'a'-10 : '0'))
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     mp_image_t *dmpi;
     struct vf_priv_s *p = vf->priv;
@@ -1332,7 +1332,7 @@
 	       "" : " @@@@@@@@@@@@@@@@@");
 
     p->merge_time += get_time() - diff_time;
-    return show_fields ? vf_next_put_image(vf, dmpi) : 0;
+    return show_fields ? vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) : 0;
 }
 
 static int query_format(struct vf_instance_s* vf, unsigned int fmt)
--- a/libmpcodecs/vf_flip.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_flip.c	Tue Mar 21 21:26:42 2006 +0000
@@ -41,12 +41,12 @@
     }
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     if(mpi->flags&MP_IMGFLAG_DIRECT){
 	// we've used DR, so we're ready...
 	if(!(mpi->flags&MP_IMGFLAG_PLANAR))
 	    ((mp_image_t*)mpi->priv)->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
-	return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
+	return vf_next_put_image(vf,(mp_image_t*)mpi->priv, pts);
     }
 
     vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
@@ -67,7 +67,7 @@
     } else
 	vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
     
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_framestep.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_framestep.c	Tue Mar 21 21:26:42 2006 +0000
@@ -75,7 +75,7 @@
 };
 
 /* Filter handler */
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     mp_image_t        *dmpi;
     struct vf_priv_s  *priv;
@@ -125,7 +125,7 @@
         dmpi->height    = mpi->height;
 
         /* Chain to next filter / output ... */
-        return vf_next_put_image(vf, dmpi);
+        return vf_next_put_image(vf, dmpi, pts);
     }
 
     /* Skip the frame */
--- a/libmpcodecs/vf_fspp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_fspp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -519,7 +519,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     mp_image_t *dmpi;
     if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
@@ -564,7 +564,7 @@
 #ifdef HAVE_MMX2
     if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
 #endif
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf)
--- a/libmpcodecs/vf_halfpack.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_halfpack.c	Tue Mar 21 21:26:42 2006 +0000
@@ -143,7 +143,7 @@
 	int dststride, int srcstride[3], int w, int h);
 
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -164,7 +164,7 @@
 			mpi->stride, mpi->w, mpi->h);
 	}
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int config(struct vf_instance_s* vf,
--- a/libmpcodecs/vf_harddup.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_harddup.c	Tue Mar 21 21:26:42 2006 +0000
@@ -15,7 +15,7 @@
 	mp_image_t *last_mpi;
 };
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 	int ret;
@@ -34,7 +34,7 @@
 		dmpi->stride[2] = mpi->stride[2];
 	}
 	
-	return vf_next_put_image(vf, dmpi);
+	return vf_next_put_image(vf, dmpi, pts);
 }
 
 static int control(struct vf_instance_s* vf, int request, void* data)
@@ -46,7 +46,7 @@
 		// has been called earlier in the filter chain
 		// since the last put_image. This is reasonable
 		// because we're handling a duplicate frame!
-		if (put_image(vf, vf->priv->last_mpi))
+		if (put_image(vf, vf->priv->last_mpi, MP_NOPTS_VALUE))
 			return CONTROL_TRUE;
 		break;
 	}
--- a/libmpcodecs/vf_hqdn3d.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_hqdn3d.c	Tue Mar 21 21:26:42 2006 +0000
@@ -207,7 +207,7 @@
 }
 
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
         int W = mpi->w, H = mpi->h;
@@ -237,7 +237,7 @@
                 vf->priv->Coefs[2],
                 vf->priv->Coefs[3]);
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_hue.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_hue.c	Tue Mar 21 21:26:42 2006 +0000
@@ -58,7 +58,7 @@
 
 /* FIXME: add packed yuv version of process */
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -89,7 +89,7 @@
 			vf->priv->hue, vf->priv->saturation);
 	}
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int control(struct vf_instance_s* vf, int request, void* data)
--- a/libmpcodecs/vf_il.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_il.c	Tue Mar 21 21:26:42 2006 +0000
@@ -77,7 +77,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int w;
 	FilterParam *luma  = &vf->priv->lumaParam;
 	FilterParam *chroma= &vf->priv->chromaParam;
@@ -104,7 +104,7 @@
 			dmpi->stride[2], mpi->stride[2], chroma->interleave, luma->swap);
 	}
     
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_ilpack.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_ilpack.c	Tue Mar 21 21:26:42 2006 +0000
@@ -353,7 +353,7 @@
 }
 
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 
@@ -364,7 +364,7 @@
 
 	ilpack(dmpi->planes[0], mpi->planes, dmpi->stride[0], mpi->stride, mpi->w, mpi->h, vf->priv->pack);
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int config(struct vf_instance_s* vf,
--- a/libmpcodecs/vf_ivtc.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_ivtc.c	Tue Mar 21 21:26:42 2006 +0000
@@ -449,10 +449,10 @@
 	}
 
 	p->outframes++;
-	return vf_next_put_image(vf, dmpi);
+	return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	int ret=0;
 	struct vf_priv_s *p = vf->priv;
--- a/libmpcodecs/vf_kerndeint.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_kerndeint.c	Tue Mar 21 21:26:42 2006 +0000
@@ -76,7 +76,7 @@
 #define PLANAR_U 1
 #define PLANAR_V 2
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
         int W = mpi->w, H = mpi->h;
@@ -272,7 +272,7 @@
 		}
 	}
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_lavc.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_lavc.c	Tue Mar 21 21:26:42 2006 +0000
@@ -115,7 +115,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t* dmpi;
     int out_size;
     AVFrame *pic= vf->priv->pic;
@@ -143,7 +143,7 @@
     
     dmpi->planes[0]=(unsigned char*)&vf->priv->pes;
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, MP_NOPTS_VALUE);
 }
 
 //===========================================================================//
@@ -203,7 +203,7 @@
     }
 #if LIBAVCODEC_BUILD >= 4754
     lavc_venc_context.time_base.num = 1000*1001;
-    lavc_venc_context.time_base.den = (p_fps<1.0) ? 0 : (p_fps * lavc_venc_context.time_base.num);
+    lavc_venc_context.time_base.den = (p_fps<1.0) ? 1000*1001*25 : (p_fps * lavc_venc_context.time_base.num);
 #else
 #if LIBAVCODEC_BUILD >= 4662
     lavc_venc_context.frame_rate_base = 1000*1001;
--- a/libmpcodecs/vf_lavcdeint.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_lavcdeint.c	Tue Mar 21 21:26:42 2006 +0000
@@ -103,7 +103,7 @@
 }
 
 static int 
-put_image (struct vf_instance_s* vf, mp_image_t *mpi)
+put_image (struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
   struct vf_priv_s *priv = vf->priv;
   mp_image_t* dmpi;
@@ -135,7 +135,7 @@
       return 0;
     }
   
-  return vf_next_put_image(vf, dmpi);
+  return vf_next_put_image(vf, dmpi, pts);
 }
 
 
--- a/libmpcodecs/vf_mirror.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_mirror.c	Tue Mar 21 21:26:42 2006 +0000
@@ -68,7 +68,7 @@
 
 //===========================================================================//
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     // hope we'll get DR buffer:
@@ -93,7 +93,7 @@
 	dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
     }
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_noise.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_noise.c	Tue Mar 21 21:26:42 2006 +0000
@@ -333,7 +333,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	mp_image_t *dmpi;
 
 	if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
@@ -359,7 +359,7 @@
 	if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
 #endif
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_palette.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_palette.c	Tue Mar 21 21:26:42 2006 +0000
@@ -73,7 +73,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     
     // hope we'll get DR buffer:
@@ -152,7 +152,7 @@
 	}
     }
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_perspective.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_perspective.c	Tue Mar 21 21:26:42 2006 +0000
@@ -257,7 +257,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
 
@@ -283,7 +283,7 @@
 				vf->priv, mpi->chroma_x_shift, mpi->chroma_y_shift);
 	}
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_phase.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_phase.c	Tue Mar 21 21:26:42 2006 +0000
@@ -178,7 +178,7 @@
    return mode;
    }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
    {
    mp_image_t *dmpi;
    int w;
@@ -219,7 +219,7 @@
 	       &vf->priv->buf[2], mode);
       }
 
-   return vf_next_put_image(vf, dmpi);
+   return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
    }
 
 static void uninit(struct vf_instance_s* vf)
--- a/libmpcodecs/vf_pp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_pp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -112,7 +112,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
 	// no DR, so get a new image! hope we'll get DR buffer:
 	vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
@@ -137,7 +137,7 @@
 		    mpi->pict_type);
 #endif
     }
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_pp7.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_pp7.c	Tue Mar 21 21:26:42 2006 +0000
@@ -369,7 +369,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     if(mpi->flags&MP_IMGFLAG_DIRECT){
@@ -401,7 +401,7 @@
     if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
 #endif
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_pullup.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_pullup.c	Tue Mar 21 21:26:42 2006 +0000
@@ -118,7 +118,7 @@
 	mpi->flags &= ~MP_IMGFLAG_DRAW_CALLBACK;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	struct pullup_context *c = vf->priv->ctx;
 	struct pullup_buffer *b;
@@ -263,7 +263,7 @@
 			dmpi->qstride = mpi->qstride;
 			dmpi->qscale_type = mpi->qscale_type;
 		}
-		return vf_next_put_image(vf, dmpi);
+		return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 	}
 	dmpi = vf_get_image(vf->next, mpi->imgfmt,
 		MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
@@ -282,7 +282,7 @@
 		dmpi->qstride = mpi->qstride;
 		dmpi->qscale_type = mpi->qscale_type;
 	}
-	ret = vf_next_put_image(vf, dmpi);
+	ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 	pullup_release_frame(f);
 	return ret;
 }
--- a/libmpcodecs/vf_qp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_qp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -117,7 +117,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	mp_image_t *dmpi;
         int x,y;
 
@@ -157,7 +157,7 @@
             }
         }
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_rectangle.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_rectangle.c	Tue Mar 21 21:26:42 2006 +0000
@@ -64,7 +64,7 @@
     return 0;
 }
 static int
-put_image(struct vf_instance_s* vf, mp_image_t* mpi){
+put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){
     mp_image_t* dmpi;
     unsigned int bpp = mpi->bpp / 8;
     unsigned int x, y, w, h;
@@ -144,7 +144,7 @@
 	    p += dmpi->stride[0];
 	}
     }
-    return vf_next_put_image(vf, dmpi);
+    return vf_next_put_image(vf, dmpi, pts);
 }
 
 static int
--- a/libmpcodecs/vf_remove_logo.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_remove_logo.c	Tue Mar 21 21:26:42 2006 +0000
@@ -771,7 +771,7 @@
  * filter, has the logo removed by the filter, and is then sent to the next
  * filter.
  */
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     
     dmpi=vf_get_image(vf->next,((vf_priv_s *)vf->priv)->fmt,
@@ -810,7 +810,7 @@
 	return 0;
     }
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_rgb2bgr.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_rgb2bgr.c	Tue Mar 21 21:26:42 2006 +0000
@@ -44,7 +44,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     // hope we'll get DR buffer:
@@ -72,7 +72,7 @@
 	    rgb24tobgr24(mpi->planes[0],dmpi->planes[0],mpi->w*mpi->h*3);
     }
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_rgbtest.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_rgbtest.c	Tue Mar 21 21:26:42 2006 +0000
@@ -86,7 +86,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     int x, y;
 
@@ -108,7 +108,7 @@
          }
      }
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_rotate.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_rotate.c	Tue Mar 21 21:26:42 2006 +0000
@@ -69,7 +69,7 @@
     return vf_next_config(vf,height,width,d_height,d_width,flags,outfmt);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     // hope we'll get DR buffer:
@@ -94,7 +94,7 @@
 	dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
     }
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_sab.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_sab.c	Tue Mar 21 21:26:42 2006 +0000
@@ -236,7 +236,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
 
@@ -250,7 +250,7 @@
 	blur(dmpi->planes[1], mpi->planes[1], cw    , ch   , dmpi->stride[1], mpi->stride[1], &vf->priv->chroma);
 	blur(dmpi->planes[2], mpi->planes[2], cw    , ch   , dmpi->stride[2], mpi->stride[2], &vf->priv->chroma);
     
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_scale.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_scale.c	Tue Mar 21 21:26:42 2006 +0000
@@ -322,7 +322,7 @@
     scale(vf->priv->ctx, vf->priv->ctx2, src, stride, y, h, dmpi->planes, dmpi->stride, vf->priv->interlaced);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi=mpi->priv;
 
 //    printf("vf_scale::put_image(): processing whole frame! dmpi=%p flag=%d\n",
@@ -346,7 +346,7 @@
 
     if(vf->priv->palette) dmpi->planes[1]=vf->priv->palette; // export palette!
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static int control(struct vf_instance_s* vf, int request, void* data){
--- a/libmpcodecs/vf_screenshot.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_screenshot.c	Tue Mar 21 21:26:42 2006 +0000
@@ -187,7 +187,7 @@
     mpi->priv=(void*)vf->dmpi;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     mp_image_t *dmpi = (mp_image_t *)mpi->priv;
     
@@ -220,7 +220,7 @@
 	vf->priv->store_slices = 0;
     }
 
-    return vf_next_put_image(vf, dmpi);
+    return vf_next_put_image(vf, dmpi, pts);
 }
 
 int control (vf_instance_t *vf, int request, void *data)
--- a/libmpcodecs/vf_smartblur.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_smartblur.c	Tue Mar 21 21:26:42 2006 +0000
@@ -184,7 +184,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	int cw= mpi->w >> mpi->chroma_x_shift;
 	int ch= mpi->h >> mpi->chroma_y_shift;
 	FilterParam *f= &vf->priv;
@@ -200,7 +200,7 @@
 	blur(dmpi->planes[1], mpi->planes[1], cw    , ch   , dmpi->stride[1], mpi->stride[1], &vf->priv->chroma);
 	blur(dmpi->planes[2], mpi->planes[2], cw    , ch   , dmpi->stride[2], mpi->stride[2], &vf->priv->chroma);
     
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_softpulldown.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_softpulldown.c	Tue Mar 21 21:26:42 2006 +0000
@@ -33,7 +33,7 @@
 	return retval;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 	int ret = 0;
@@ -59,7 +59,7 @@
 	}
 
 	if (state == 0) {
-		ret = vf_next_put_image(vf, mpi);
+		ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
 		vf->priv->out++;
 		if (flags & MP_IMGFIELD_REPEAT_FIRST) {
 			my_memcpy_pic(dmpi->planes[0],
@@ -95,10 +95,10 @@
 			              mpi->chroma_width, mpi->chroma_height/2,
 			              dmpi->stride[2]*2, mpi->stride[2]*2);
 		}
-		ret = vf_next_put_image(vf, dmpi);
+		ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 		vf->priv->out++;
 		if (flags & MP_IMGFIELD_REPEAT_FIRST) {
-			ret |= vf_next_put_image(vf, mpi);
+			ret |= vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
 			vf->priv->out++;
 			state=0;
 		} else {
--- a/libmpcodecs/vf_softskip.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_softskip.c	Tue Mar 21 21:26:42 2006 +0000
@@ -15,7 +15,7 @@
 	int skipflag;
 };
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 	
@@ -34,7 +34,7 @@
 		dmpi->stride[2] = mpi->stride[2];
 	}
 	
-	return vf_next_put_image(vf, dmpi);
+	return vf_next_put_image(vf, dmpi, pts);
 }
 
 static int control(struct vf_instance_s* vf, int request, void* data)
--- a/libmpcodecs/vf_spp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_spp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -465,7 +465,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	mp_image_t *dmpi;
 
 	if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
@@ -508,7 +508,7 @@
 	if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
 #endif
 
-	return vf_next_put_image(vf,dmpi);
+	return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_swapuv.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_swapuv.c	Tue Mar 21 21:26:42 2006 +0000
@@ -53,7 +53,7 @@
     mpi->priv=(void*)dmpi;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     
     if(mpi->flags&MP_IMGFLAG_DIRECT){
@@ -72,7 +72,7 @@
     
     vf_clone_mpi_attributes(dmpi, mpi);
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_telecine.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_telecine.c	Tue Mar 21 21:26:42 2006 +0000
@@ -30,7 +30,7 @@
 	return retval;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	mp_image_t *dmpi;
 	int ret;
@@ -58,7 +58,7 @@
 				mpi->chroma_width, mpi->chroma_height/2,
 				dmpi->stride[2]*2, mpi->stride[2]*2);
 		}
-		ret = vf_next_put_image(vf, dmpi);
+		ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 	case 1:
 	case 2:
 		memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h,
@@ -71,7 +71,7 @@
 				mpi->chroma_width, mpi->chroma_height,
 				dmpi->stride[2], mpi->stride[2]);
 		}
-		return vf_next_put_image(vf, dmpi) || ret;
+		return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) || ret;
 	case 3:
 		my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
 			mpi->planes[0]+mpi->stride[0], mpi->w, mpi->h/2,
@@ -86,7 +86,7 @@
 				mpi->chroma_width, mpi->chroma_height/2,
 				dmpi->stride[2]*2, mpi->stride[2]*2);
 		}
-		ret = vf_next_put_image(vf, dmpi);
+		ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 		my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
 			dmpi->stride[0]*2, mpi->stride[0]*2);
 		if (mpi->flags & MP_IMGFLAG_PLANAR) {
--- a/libmpcodecs/vf_test.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_test.c	Tue Mar 21 21:26:42 2006 +0000
@@ -268,7 +268,7 @@
 	}
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     int frame= vf->priv->frame_num;
 
@@ -301,7 +301,7 @@
 
     frame++;
     vf->priv->frame_num= frame;
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_tfields.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_tfields.c	Tue Mar 21 21:26:42 2006 +0000
@@ -311,7 +311,7 @@
 static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up);
 static void (*qpel_4tap)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up);
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	int i;
 	int ret=0;
@@ -356,7 +356,7 @@
 				dmpi->stride[1] = 2*mpi->stride[1];
 				dmpi->stride[2] = 2*mpi->stride[2];
 			}
-			ret |= vf_next_put_image(vf, dmpi);
+			ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		}
 		break;
@@ -383,7 +383,7 @@
 				deint(dmpi->planes[2], dmpi->stride[2], mpi->planes[2], mpi->stride[2],
 					mpi->chroma_width, mpi->chroma_height, (i^!tff));
 			}
-			ret |= vf_next_put_image(vf, dmpi);
+			ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		}
 		break;
@@ -406,7 +406,7 @@
 					mpi->chroma_width, mpi->chroma_height/2,
 					dmpi->stride[2], mpi->stride[2]*2, (i^!tff));
 			}
-			ret |= vf_next_put_image(vf, dmpi);
+			ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 			if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
 		}
 		break;
--- a/libmpcodecs/vf_tile.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_tile.c	Tue Mar 21 21:26:42 2006 +0000
@@ -93,7 +93,7 @@
 }
 
 /* Filter handler */
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
     mp_image_t        *dmpi;
     struct vf_priv_s  *priv;
@@ -170,7 +170,7 @@
         /* Display the composition */
         dmpi->width  = xw;
         dmpi->height = yh;
-        return vf_next_put_image(vf, dmpi);
+        return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
     }
     else {
         /* Skip the frame */
--- a/libmpcodecs/vf_tinterlace.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_tinterlace.c	Tue Mar 21 21:26:42 2006 +0000
@@ -35,7 +35,7 @@
 	mp_image_t *dmpi;
 };
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
 {
 	int ret = 0;
 	mp_image_t *dmpi;
@@ -74,16 +74,16 @@
 					   mpi->chroma_width, mpi->chroma_height,
 					   dmpi->stride[2]*2, mpi->stride[2]);
 			}
-			ret = vf_next_put_image(vf, dmpi);
+			ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 		}
 		break;
 	case 1:
 		if (vf->priv->frame & 1)
-			ret = vf_next_put_image(vf, mpi);
+			ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
 		break;
 	case 2:
 		if ((vf->priv->frame & 1) == 0)
-			ret = vf_next_put_image(vf, mpi);
+			ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
 		break;
 	case 3:
 		dmpi = vf_get_image(vf->next, mpi->imgfmt,
@@ -114,7 +114,7 @@
 					   dmpi->stride[2]*2, mpi->stride[2]);
 			}
 		}
-		ret = vf_next_put_image(vf, dmpi);
+		ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
 		break;
 	}
 
--- a/libmpcodecs/vf_unsharp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_unsharp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -183,7 +183,7 @@
     mpi->flags |= MP_IMGFLAG_DIRECT;
 }
 
-static int put_image( struct vf_instance_s* vf, mp_image_t *mpi ) {
+static int put_image( struct vf_instance_s* vf, mp_image_t *mpi, double pts) {
     mp_image_t *dmpi;
 
     if( !(mpi->flags & MP_IMGFLAG_DIRECT) )
@@ -206,7 +206,7 @@
 	asm volatile ("sfence\n\t");
 #endif
     
-    return vf_next_put_image( vf, dmpi );
+    return vf_next_put_image( vf, dmpi, pts);
 }
 
 static void uninit( struct vf_instance_s* vf ) {
--- a/libmpcodecs/vf_uspp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_uspp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -275,7 +275,7 @@
     mpi->flags|=MP_IMGFLAG_DIRECT;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
@@ -307,7 +307,7 @@
     if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
 #endif
 
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 static void uninit(struct vf_instance_s* vf){
--- a/libmpcodecs/vf_vo.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_vo.c	Tue Mar 21 21:26:42 2006 +0000
@@ -100,7 +100,7 @@
 }
 
 static int put_image(struct vf_instance_s* vf,
-        mp_image_t *mpi){
+        mp_image_t *mpi, double pts){
   if(!vo_config_count) return 0; // vo not configured?
   // first check, maybe the vo/vf plugin implements draw_image using mpi:
   if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return 1; // done.
--- a/libmpcodecs/vf_yuvcsp.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_yuvcsp.c	Tue Mar 21 21:26:42 2006 +0000
@@ -30,7 +30,7 @@
     return (x > 240) ? 240 : (x < 16) ? 16 : x;
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     int i,j;
     uint8_t *y_in, *cb_in, *cr_in;
     uint8_t *y_out, *cb_out, *cr_out;
@@ -58,7 +58,7 @@
 	    cr_out[i*vf->dmpi->stride[2]+j] = clamp_c(cr_in[i*mpi->stride[2]+j]);
 	}
     
-    return vf_next_put_image(vf,vf->dmpi);
+    return vf_next_put_image(vf,vf->dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_yuy2.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_yuy2.c	Tue Mar 21 21:26:42 2006 +0000
@@ -30,7 +30,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YUY2);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
 
     // hope we'll get DR buffer:
@@ -47,7 +47,7 @@
     
     vf_clone_mpi_attributes(dmpi, mpi);
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_yvu9.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_yvu9.c	Tue Mar 21 21:26:42 2006 +0000
@@ -27,7 +27,7 @@
     return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YV12);
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
     mp_image_t *dmpi;
     int y,w,h;
 
@@ -57,7 +57,7 @@
 
     vf_clone_mpi_attributes(dmpi, mpi);
     
-    return vf_next_put_image(vf,dmpi);
+    return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
--- a/libmpcodecs/vf_zrmjpeg.c	Tue Mar 21 06:09:32 2006 +0000
+++ b/libmpcodecs/vf_zrmjpeg.c	Tue Mar 21 21:26:42 2006 +0000
@@ -663,7 +663,7 @@
 		(priv->fields == 2) ? IMGFMT_ZRMJPEGIT : IMGFMT_ZRMJPEGNI); 
 }
 
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
+static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
 	struct vf_priv_s *priv = vf->priv;
 	int size = 0;
 	int i;
@@ -679,7 +679,7 @@
 			MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h);
 	dmpi->planes[0] = (uint8_t*)priv->buf;
 	dmpi->planes[1] = (uint8_t*)size;
-	return vf_next_put_image(vf,dmpi); 
+	return vf_next_put_image(vf,dmpi, pts); 
 }
 
 static int query_format(struct vf_instance_s* vf, unsigned int fmt){