[MPlayer-users] Mencoderpatch for-mpegopts format=dvd (Attn.:Nico)

VJ vj at vijaygill.homelinux.net
Mon Dec 6 16:47:56 CET 2004


> I don't have time to send a fixed patch now, but this is a quick fix:
> in libmpdemux/muxer_mpeg.c change in function parse_mpeg12_video()
>
> if(vsh->format == 0x10000001 || vsh->format == 0x10000002)
>
> in
>
> if(1)
>
> (it has to check mmioFOURCC('m','p','g','2') and
> mmioFOURCC('m','p','g','1') too)
>
> and recompile.
>
>     Nico

I found the line in the following section of the file you mentioned, and I
commented out the code and put in "if(1)" and recompiled.
Now it encodes properly and I will give you final report in the evening,
when I go home.
***********************************************************************
static void mpegfile_write_chunk(muxer_stream_t *s,size_t len,unsigned int
flags){
  size_t ptr=0, sz = 0, pos;
  uint64_t pts;
  muxer_t *muxer = s->muxer;
  muxer_priv_t *priv = (muxer_priv_t *)muxer->priv;
  muxer_headers_t *spriv = (muxer_headers_t*) s->priv;
  FILE *f;
  sh_audio_t *ash = NULL;
  sh_video_t *vsh;

  f = muxer->file;

  if((s->buffer == NULL) || (len == 0))
        return;

  pts = 0;
  if (s->type == MUXER_TYPE_VIDEO) { // try to recognize frame type...
        vsh = (sh_video_t *) s->osh;
        spriv->type = 1;
        spriv->has_pes_priv_headers = 0;

//    if (vsh->format == 0x10000001 || vsh->format == 0x10000002)
    if(1)
        sz = parse_mpeg12_video(s, priv, spriv, vsh, len);
***********************************************************************
Regards from
VJ




More information about the MPlayer-users mailing list