summaryrefslogtreecommitdiffstats
path: root/libmpdemux/muxer_rawvideo.c
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-19 05:44:27 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-19 05:44:27 +0000
commit389246593568ef0ed92a96f03abd7c26f77979e2 (patch)
treef5e939c49c81b0cf7aa8b2581de4e85de48ead7d /libmpdemux/muxer_rawvideo.c
parent7cb2c21193bdc53be6df34f7b12838b53469d900 (diff)
downloadmpv-389246593568ef0ed92a96f03abd7c26f77979e2.tar.bz2
mpv-389246593568ef0ed92a96f03abd7c26f77979e2.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16806 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/muxer_rawvideo.c')
-rw-r--r--libmpdemux/muxer_rawvideo.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libmpdemux/muxer_rawvideo.c b/libmpdemux/muxer_rawvideo.c
index b3f41e7545..eff3eb019f 100644
--- a/libmpdemux/muxer_rawvideo.c
+++ b/libmpdemux/muxer_rawvideo.c
@@ -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 @@ static muxer_stream_t* rawvideofile_new_stream(muxer_t *muxer,int type){
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 @@ static void rawvideofile_write_chunk(muxer_stream_t *s,size_t len,unsigned int f
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: