[MPlayer-cvslog] r36401 - trunk/libmpcodecs/vd.c

Ingo Brückl ib at wupperonline.de
Tue Aug 6 11:34:36 CEST 2013


Reimar Döffinger wrote on Mon, 5 Aug 2013 23:11:47 +0200:

> On 05.08.2013, at 21:36, Ingo Brückl <ib at wupperonline.de> wrote:

>> Reimar Döffinger wrote on Mon, 5 Aug 2013 20:49:28 +0200:
>>
>>> That one seems fine to me, except that the vd_mpegpes change seems
>>> completely broken to me (will cause continuous reinits if a different
>>> aspect is forced into sh_aspect).
>>
>> Isn't that what vd_mpegpes already does right now?
>>
>>  if(len>10 && !d[0] && !d[1] && d[2]==1 && d[3]==0xB3) {
>>      float old_aspect = sh->aspect;
>>      int oldw = sh->disp_w, oldh = sh->disp_h;
>>      mp_header_process_sequence_header(&picture, &d[4]);
>>      sh->aspect = mpeg12_aspect_info(&picture);
>>      sh->disp_w = picture.display_picture_width;
>>      sh->disp_h = picture.display_picture_height;
>>      if(sh->aspect != old_aspect || sh->disp_w != oldw || sh->disp_h != oldh) {
>>          if(!mpcodecs_config_vo(sh, sh->disp_w,sh->disp_h,IMGFMT_MPEGPES))
>>              return 0;
>>      }
>>  }
>>
>> If mpeg12_aspect_info(&picture) differs from actual sh->aspect (old_aspect),
>> mpcodecs_config_vo() will be called where sh->aspect may be changed by a
>> movie_aspect setting, thus making sh->aspect different from the picture
>> aspect again.

> Maybe, it certainly isn't what it is supposed to do...
> The condition should trigger once when the encoded aspect changes.

Well, the new differentiation between original aspect and forced aspect will
come in handy then. (I suppose that sh->aspect once was the original,
unchanged aspect - as its pre-r36391 comment in stheader.h seems to indicate -
and that this has been changed some day causing the bug you've discovered in
vd_mpegpes.) The patch now looks like a simple renaming and not different
from the changes in the other demuxers, but actually fixes a bug at the same
time.

I don't know whether it is possible to test vd_mpegpes without a hardware
decoder. If so, please tell me.

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vd_mpegpes.patch
Type: application/octet-stream
Size: 1044 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20130806/8024a5b3/attachment.obj>


More information about the MPlayer-cvslog mailing list