From cb47a72a44a7b08dee2b43d2f52b40472dac36af Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 21 Jan 2007 10:10:07 +0000 Subject: [PATCH] support -ffourcc with -of lavf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21978 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/muxer.h | 2 ++ libmpdemux/muxer_lavf.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libmpdemux/muxer.h b/libmpdemux/muxer.h index 6770e5d85f..aa862f9267 100644 --- a/libmpdemux/muxer.h +++ b/libmpdemux/muxer.h @@ -98,6 +98,8 @@ typedef struct muxbuf_t { unsigned int flags; } muxbuf_t; +extern char *force_fourcc; + muxer_t *muxer_new_muxer(int type,stream_t *stream); #define muxer_new_stream(muxer,a) muxer->cont_new_stream(muxer,a) #define muxer_stream_fix_parameters(muxer, a) muxer->fix_stream_parameters(a) diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index f9531a35a8..3067d78417 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -239,7 +239,7 @@ static void fix_parameters(muxer_stream_t *stream) else if(stream->type == MUXER_TYPE_VIDEO) { ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression); - if(ctx->codec_id <= 0) + if(ctx->codec_id <= 0 || force_fourcc) ctx->codec_tag= stream->bih->biCompression; mp_msg(MSGT_MUXER, MSGL_INFO, "VIDEO CODEC ID: %d\n", ctx->codec_id); ctx->width = stream->bih->biWidth;