Ticket #37: mplayer-vf_vo-2.patch

File mplayer-vf_vo-2.patch, 2.6 KB (added by mplayer-bugs@…, 15 years ago)

New patch per Reimar's suggestion

  • mencoder.c

    RCS file: /cvsroot/mplayer/main/mencoder.c,v
    retrieving revision 1.251
    diff -u -r1.251 mencoder.c
     
    18611861}
    18621862#endif
    18631863
     1864void initial_set_video_colors() {} // no-op in mencoder
  • mplayer.c

    RCS file: /cvsroot/mplayer/main/mplayer.c,v
    retrieving revision 1.763
    diff -u -r1.763 mplayer.c
     
    17751775// ========== Init display (sh_video->disp_w*sh_video->disp_h/out_fmt) ============
    17761776
    17771777current_module="init_vo";
    1778     if (sh_video)
    1779     {
    1780         if (vo_gamma_gamma != 1000)
    1781           set_video_colors (sh_video, "gamma", vo_gamma_gamma);
    1782         if (vo_gamma_brightness != 1000)
    1783             set_video_colors(sh_video, "brightness", vo_gamma_brightness);
    1784         if (vo_gamma_contrast != 1000)
    1785             set_video_colors(sh_video, "contrast", vo_gamma_contrast);
    1786         if (vo_gamma_saturation != 1000)
    1787             set_video_colors(sh_video, "saturation", vo_gamma_saturation);
    1788         if (vo_gamma_hue != 1000)
    1789             set_video_colors(sh_video, "hue", vo_gamma_hue);
    1790     }
    1791 
    17921778   if(vo_flags & 0x08 && vo_spudec)
    17931779      spudec_set_hw_spu(vo_spudec,video_out);
    17941780
     
    38073793
    38083794return 1;
    38093795}
     3796
     3797void initial_set_video_colors()
     3798{
     3799    if (sh_video)
     3800    {
     3801        if (vo_gamma_gamma != 1000)
     3802          set_video_colors (sh_video, "gamma", vo_gamma_gamma);
     3803        if (vo_gamma_brightness != 1000)
     3804          set_video_colors(sh_video, "brightness", vo_gamma_brightness);
     3805        if (vo_gamma_contrast != 1000)
     3806          set_video_colors(sh_video, "contrast", vo_gamma_contrast);
     3807        if (vo_gamma_saturation != 1000)
     3808          set_video_colors(sh_video, "saturation", vo_gamma_saturation);
     3809        if (vo_gamma_hue != 1000)
     3810          set_video_colors(sh_video, "hue", vo_gamma_hue);
     3811    }
     3812}
  • libmpcodecs/vf_vo.c

    RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_vo.c,v
    retrieving revision 1.24
    diff -u -r1.24 vf_vo.c
     
    1414
    1515#define video_out ((vo_functions_t*)(vf->priv))
    1616
     17extern void initial_set_video_colors();
     18
    1719static int query_format(struct vf_instance_s* vf, unsigned int fmt); /* forward declaration */
    1820
    1921static int config(struct vf_instance_s* vf,
     
    4951        return 0;
    5052
    5153    ++vo_config_count;
     54    initial_set_video_colors();
    5255    return 1;
    5356}
    5457