[MPlayer-dev-eng] Re: [PATCH] Allow aspect change in TS and DVB

Carl Eugen Hoyos cehoyos at ag.or.at
Tue May 9 02:18:59 CEST 2006


Hi Nico!

Nico Sabbi <nicola_sabbi <at> fastwebnet.it> writes:

> 
> Carl Eugen Hoyos wrote:

[...]

> >So I would suggest once again to test the demuxer type: Does it make sense to
> >check for aspect ration change in another medium than TS/DVB?
> >  
> >
> 
> yes, ever heard of dvd?

There are really DVDs with aspect change? I didn't know...

[...]

> As for the A/R function Ivan and I think that video.c is not really the 
> best place for it;
> maybe mpeg_hdr.c.
> Opinions?

AFAICT, the information has to get from a frame, decoded in mpeg_hdr.c, into the
sh_video data structure, which is not present in mpeg_hdr.c, so I don't see how
this could be done without changing video.c a bit.
One line patch attached.

I hope it's clean enough now, Carl Eugen Hoyos

Index: libmpdemux/video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/video.c,v
retrieving revision 1.64
diff -u -r1.64 video.c
--- libmpdemux/video.c  7 May 2006 16:05:38 -0000       1.64
+++ libmpdemux/video.c  9 May 2006 00:17:07 -0000
@@ -440,7 +440,9 @@
           //printf("read packet 0x%X, len=%d\n",i,videobuf_len);
          // process headers:
          switch(i){
-             case 0x1B3: mp_header_process_sequence_header (&picture,
&videobuffer[start]);break;
+             case 0x1B3: mp_header_process_sequence_header (&picture,
&videobuffer[start]);
+                          sh_video->aspect = mpeg12_aspect_info(&picture);
+                          break;
              case 0x1B5: mp_header_process_extension (&picture,
&videobuffer[start]);break;
              case 0x1B2: process_userdata (&videobuffer[start],
videobuf_len-start);break;
              case 0x100: picture_coding_type=(videobuffer[start+1] >> 3) & 7;break;





More information about the MPlayer-dev-eng mailing list