Index: libmpcodecs/ve_lavc.c =================================================================== --- libmpcodecs/ve_lavc.c (revision 23205) +++ libmpcodecs/ve_lavc.c (working copy) @@ -563,6 +563,7 @@ lavc_venc_context->refs = lavc_param_refs; lavc_venc_context->b_sensitivity = lavc_param_b_sensitivity; + mux_v->imgfmt = lavc_param_format; switch(lavc_param_format) { case IMGFMT_YV12: @@ -988,6 +989,8 @@ mux_v->bih->biCompression = mmioFOURCC('S', 'N', 'O', 'W'); else if (!strcasecmp(lavc_param_vcodec, "flv")) mux_v->bih->biCompression = mmioFOURCC('F', 'L', 'V', '1'); + else if (!strcasecmp(lavc_param_vcodec, "dvvideo")) + mux_v->bih->biCompression = mmioFOURCC('d', 'v', 's', 'd'); else mux_v->bih->biCompression = mmioFOURCC(lavc_param_vcodec[0], lavc_param_vcodec[1], lavc_param_vcodec[2], lavc_param_vcodec[3]); /* FIXME!!! */ Index: fmt-conversion.h =================================================================== --- fmt-conversion.h (revision 23205) +++ fmt-conversion.h (working copy) @@ -3,7 +3,7 @@ #else #include "avutil.h" #endif -#include "img_format.h" +#include "libmpcodecs/img_format.h" enum PixelFormat imgfmt2pixfmt(int fmt) { Index: libmpdemux/muxer.h =================================================================== --- libmpdemux/muxer.h (revision 23205) +++ libmpdemux/muxer.h (working copy) @@ -40,6 +40,7 @@ BITMAPINFOHEADER *bih; // in format int encoder_delay; // in number of frames int decoder_delay; // in number of frames + int imgfmt; // mpeg specific: size_t ipb[3]; // sizes of I/P/B frames // muxer of that stream Index: libmpdemux/muxer_lavf.c =================================================================== --- libmpdemux/muxer_lavf.c (revision 23205) +++ libmpdemux/muxer_lavf.c (working copy) @@ -240,6 +240,7 @@ 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->pix_fmt = imgfmt2pixfmt(stream->imgfmt); ctx->width = stream->bih->biWidth; ctx->height = stream->bih->biHeight; ctx->bit_rate = 800000; Index: libavformat/dvenc.c =================================================================== --- libavformat/dvenc.c (revision 8863) +++ libavformat/dvenc.c (working copy) @@ -266,13 +266,15 @@ /* Lets see if we have enough data to construct one DV frame */ if (c->has_video == 1 && c->has_audio + 1 == 1<n_ast) { dv_inject_metadata(c, *frame); + c->has_audio = 0; for (i=0; in_ast; i++) { dv_inject_audio(c, i, *frame); av_fifo_drain(&c->audio_data[i], reqasize); + c->has_audio |= ((reqasize <= av_fifo_size(&c->audio_data[i])) << i); } c->has_video = 0; - c->has_audio = 0; + c->frames++; return c->sys->frame_size;