[MPlayer-cvslog] CVS: main/libmpdemux muxer_rawvideo.c,1.3,1.4
Richard Felker CVS
syncmail at mplayerhq.hu
Wed Oct 19 07:44:29 CEST 2005
CVS change done by Richard Felker CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv4577/libmpdemux
Modified Files:
muxer_rawvideo.c
Log Message:
processing audio is sometimes essential for a/v sync, so 1000l to
whoever made rawvideo muxer disable audio!!
with this patch, audio is processed but simply thrown away by the
muxer. various 'error' conditions in rawvideo muxer are removed to
make it work. feel free to re-add them if they can be done without
breaking anything, but do not use printf !!!!
btw old behavior can be obtained by manually specifying -nosound.
Index: muxer_rawvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_rawvideo.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- muxer_rawvideo.c 21 Feb 2005 21:45:49 -0000 1.3
+++ muxer_rawvideo.c 19 Oct 2005 05:44:27 -0000 1.4
@@ -21,14 +21,6 @@
static muxer_stream_t* rawvideofile_new_stream(muxer_t *muxer,int type){
muxer_stream_t* s;
if (!muxer) return NULL;
- if (type == MUXER_TYPE_AUDIO) {
- printf("Rawvideo muxer does not support audio !\n");
- return NULL;
- }
- if(muxer->avih.dwStreams>=1){
- printf("Too many streams! Rawvideo muxer supports only one video stream !\n");
- return NULL;
- }
s=malloc(sizeof(muxer_stream_t));
memset(s,0,sizeof(muxer_stream_t));
if(!s) return NULL; // no mem!?
@@ -44,9 +36,6 @@
s->h.fccType=streamtypeVIDEO;
if(!muxer->def_v) muxer->def_v=s;
break;
- default:
- printf("WarninG! unknown stream type: %d\n",type);
- return NULL;
}
muxer->avih.dwStreams++;
return s;
@@ -65,6 +54,7 @@
muxer_t *muxer=s->muxer;
// write out the chunk:
+ if (s->type == MUXER_TYPE_VIDEO)
write_rawvideo_chunk(muxer->file,len,s->buffer); /* unsigned char */
// alter counters:
More information about the MPlayer-cvslog
mailing list