[Mplayer-cvslog] CVS: main/libmpcodecs vd.h, 1.12, 1.13 dec_video.c, 1.159, 1.160 dec_video.h, 1.14, 1.15 vd_ffmpeg.c, 1.120, 1.121 ad_ffmpeg.c, 1.13, 1.14
Michael Niedermayer CVS
syncmail at mplayerhq.hu
Wed Feb 18 16:23:44 CET 2004
- Previous message: [Mplayer-cvslog] CVS: main mplayer.c,1.746,1.747
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vd.h, 1.12, 1.13 dec_video.c,1.159, 1.160 dec_video.h, 1.14, 1.15 vd_ffmpeg.c, 1.120,1.121 ad_ffmpeg.c, 1.13, 1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv20408/libmpcodecs
Modified Files:
vd.h dec_video.c dec_video.h vd_ffmpeg.c ad_ffmpeg.c
Log Message:
flushing stuff after seeking (finally we can view MPEG without thouse blocks after seeking with -vc ffmpeg12)
Index: vd.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- vd.h 22 Sep 2002 00:43:13 -0000 1.12
+++ vd.h 18 Feb 2004 15:23:41 -0000 1.13
@@ -23,6 +23,7 @@
#define VDCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
#define VDCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
#define VDCTRL_GET_EQUALIZER 7 /* get color options (brightness,contrast etc) */
+#define VDCTRL_RESYNC_STREAM 8 /* seeking */
// callbacks:
int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);
Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- dec_video.c 22 Aug 2003 22:17:47 -0000 1.159
+++ dec_video.c 18 Feb 2004 15:23:41 -0000 1.160
@@ -132,6 +132,11 @@
return 0;
}
+void resync_video_stream(sh_video_t *sh_video)
+{
+ if(mpvdec) mpvdec->control(sh_video, VDCTRL_RESYNC_STREAM, NULL);
+}
+
void uninit_video(sh_video_t *sh_video){
if(!sh_video->inited) return;
mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_UninitVideoStr,sh_video->codec->drv);
Index: dec_video.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dec_video.h 13 Oct 2002 21:58:54 -0000 1.14
+++ dec_video.h 18 Feb 2004 15:23:41 -0000 1.15
@@ -18,5 +18,6 @@
extern int get_video_colors(sh_video_t *sh_video,char *item,int *value);
extern int set_video_colors(sh_video_t *sh_video,char *item,int value);
extern int set_rectangle(sh_video_t *sh_video,int param,int value);
+extern void resync_video_stream(sh_video_t *sh_video);
extern int divx_quality;
Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- vd_ffmpeg.c 12 Feb 2004 23:09:22 -0000 1.120
+++ vd_ffmpeg.c 18 Feb 2004 15:23:41 -0000 1.121
@@ -137,7 +137,11 @@
#endif
}
return CONTROL_FALSE;
- }
+ }
+ break;
+ case VDCTRL_RESYNC_STREAM:
+ avcodec_flush_buffers(avctx);
+ return CONTROL_TRUE;
}
return CONTROL_UNKNOWN;
}
Index: ad_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_ffmpeg.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ad_ffmpeg.c 8 Mar 2003 02:05:14 -0000 1.13
+++ ad_ffmpeg.c 18 Feb 2004 15:23:41 -0000 1.14
@@ -126,8 +126,13 @@
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
{
- // TODO ???
- return CONTROL_UNKNOWN;
+ AVCodecContext *lavc_context = sh->context;
+ switch(cmd){
+ case ADCTRL_RESYNC_STREAM:
+ avcodec_flush_buffers(lavc_context);
+ return CONTROL_TRUE;
+ }
+ return CONTROL_UNKNOWN;
}
static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
@@ -139,6 +144,7 @@
int x=ds_get_packet(sh_audio->ds,&start);
if(x<=0) break; // error
y=avcodec_decode_audio(sh_audio->context,(INT16*)buf,&len2,start,x);
+//printf("return:%d samples_out:%d bitstream_in:%d sample_sum:%d\n", y, len2, x, len); fflush(stdout);
if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; }
if(y<x) sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!)
if(len2>0){
- Previous message: [Mplayer-cvslog] CVS: main mplayer.c,1.746,1.747
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vd.h, 1.12, 1.13 dec_video.c,1.159, 1.160 dec_video.h, 1.14, 1.15 vd_ffmpeg.c, 1.120,1.121 ad_ffmpeg.c, 1.13, 1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list