~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to libmedia/ffmpeg/VideoDecoderFfmpeg.cpp

  • Committer: Package Import Robot
  • Author(s): Thomas Ward
  • Date: 2014-01-23 13:33:41 UTC
  • Revision ID: package-import@ubuntu.com-20140123133341-v7aonl1ntwxmg61m
Tags: 0.8.11~git20120629-1ubuntu3.1
* New upstream patch:
  + debian/patches/fix-ffmpeg-media-handler.patch:
    - Include upstream patch and changes to fix an issue where the ffmpeg
      media handler does not work due to deprecated api. (LP: #1253468)

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        boost::uint8_t* extradata, int extradataSize)
172
172
{
173
173
    // Init the avdecoder-decoder
 
174
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52,6,2)
 
175
    // Starting from this version avcodec_register calls avcodec_init
174
176
    avcodec_init();
 
177
#endif
175
178
    avcodec_register_all();// change this to only register need codec?
176
179
 
177
180
    _videoCodec = avcodec_find_decoder(codecId); 
529
532
 
530
533
    static unsigned int pic_num = 0;
531
534
    pic->type = FF_BUFFER_TYPE_USER;
 
535
#if LIBAVCODEC_VERSION_MAJOR < 54
 
536
    // This field has been unused for longer but has been removed with
 
537
    // libavcodec 54.
532
538
    pic->age  = ++pic_num - surface->getPicNum();
 
539
#endif
533
540
    surface->setPicNum(pic_num);
534
541
    return 0;
535
542
#endif