~paulbrianstewart/mplayer/medibuntu.natty

« back to all changes in this revision

Viewing changes to gui/bitmap.c

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 int             len;
35
35
 AVCodecContext *avctx;
36
36
 AVFrame        *frame;
37
 
 
 
37
 
38
38
 FILE *fp=fopen( fname,"rb" );
39
 
 if ( !fp ) 
 
39
 if ( !fp )
40
40
  {
41
41
   mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] file read error ( %s )\n",fname );
42
42
   return 1;
45
45
 fseek(fp, 0, SEEK_END);
46
46
 len = ftell(fp);
47
47
 if (len > 50 * 1024 * 1024) return 2;
48
 
 data = malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
 
48
 data = av_malloc(len + FF_INPUT_BUFFER_PADDING_SIZE);
49
49
 fseek(fp, 0, SEEK_SET);
50
50
 fread(data, len, 1, fp);
51
51
 fclose(fp);
59
59
   case PIX_FMT_GRAY8:    bf->BPP =  8; break;
60
60
   case PIX_FMT_GRAY16BE: bf->BPP = 16; break;
61
61
   case PIX_FMT_RGB24:    bf->BPP = 24; break;
62
 
   case PIX_FMT_RGB32:    bf->BPP = 32; break;
 
62
   case PIX_FMT_BGRA:
 
63
   case PIX_FMT_ARGB:     bf->BPP = 32; break;
63
64
   default:               bf->BPP =  0; break;
64
65
 }
65
66
 if (decode_ok && bf->BPP) {
73
74
 avcodec_close(avctx);
74
75
 av_freep(&frame);
75
76
 av_freep(&avctx);
 
77
 av_freep(&data);
76
78
 
77
79
 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] filename: %s.\n",fname );
78
80
 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png]  size: %dx%d bits: %d\n",bf->Width,bf->Height,bf->BPP );
108
110
static void Normalize( txSample * bf )
109
111
{
110
112
 int           i;
111
 
#ifndef WORDS_BIGENDIAN 
 
113
#if !HAVE_BIGENDIAN
112
114
 for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i+3]=0;
113
115
#else
114
 
 for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0; 
 
116
 for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0;
115
117
#endif
116
118
}
117
119
 
146
148
{
147
149
 fname=fExist( fname );
148
150
 if ( fname == NULL ) return -2;
149
 
 if ( pngRead( fname,bf ) ) 
 
151
 if ( pngRead( fname,bf ) )
150
152
  {
151
153
   mp_dbg( MSGT_GPLAYER,MSGL_FATAL,"[bitmap] unknown file type ( %s )\n",fname );
152
154
   return -5;