[MPlayer-cvslog] CVS: main/libmpdemux muxer_avi.c,1.36,1.37
Corey Hickey CVS
syncmail at mplayerhq.hu
Tue Feb 21 10:39:24 CET 2006
- Previous message: [MPlayer-cvslog] CVS: main mencoder.c,1.340,1.341
- Next message: [MPlayer-cvslog] CVS: main/libmpcodecs ve_lavc.c, 1.131, 1.132 ve_x264.c, 1.45, 1.46 ve_xvid4.c, 1.23, 1.24 ve_xvid.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
CVS change done by Corey Hickey CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv29957/libmpdemux
Modified Files:
muxer_avi.c
Log Message:
Fix video delay when encoding with B-frames.
Encoding delay is adjusted for on-the-fly during encoding.
Decoding delay is compensated for by setting an appropriate dwStart on
the audio stream (only in muxer_avi at this point).
Index: muxer_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_avi.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- muxer_avi.c 19 Feb 2006 09:34:37 -0000 1.36
+++ muxer_avi.c 21 Feb 2006 09:39:22 -0000 1.37
@@ -665,10 +665,19 @@
}
}
+static void avifile_fix_parameters(muxer_stream_t *s){
+ /* adjust audio_delay_fix according to individual stream delay */
+ if (s->type == MUXER_TYPE_AUDIO)
+ s->muxer->audio_delay_fix -= (float)s->decoder_delay * s->h.dwScale/s->h.dwRate;
+ if (s->type == MUXER_TYPE_VIDEO)
+ s->muxer->audio_delay_fix += (float)s->decoder_delay * s->h.dwScale/s->h.dwRate;
+}
+
int muxer_init_muxer_avi(muxer_t *muxer){
muxer->cont_new_stream = &avifile_new_stream;
muxer->cont_write_chunk = &avifile_write_chunk;
muxer->cont_write_header = &avifile_write_header;
muxer->cont_write_index = &avifile_write_index;
+ muxer->fix_stream_parameters = &avifile_fix_parameters;
return 1;
}
- Previous message: [MPlayer-cvslog] CVS: main mencoder.c,1.340,1.341
- Next message: [MPlayer-cvslog] CVS: main/libmpcodecs ve_lavc.c, 1.131, 1.132 ve_x264.c, 1.45, 1.46 ve_xvid4.c, 1.23, 1.24 ve_xvid.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list