~ubuntu-branches/ubuntu/maverick/mythtv/maverick

« back to all changes in this revision

Viewing changes to libs/libmythtv/avformatdecoder.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello, Dave Walker, Mario Limonciello
  • Date: 2010-02-27 14:33:45 UTC
  • mfrom: (1.1.48 upstream)
  • Revision ID: james.westby@ubuntu.com-20100227143345-qye52374g4b4caf9
Tags: 0.23.0~trunk23623-0ubuntu1
[ Dave Walker ]
* debian/control:  Added quilt as a build-depends, primarily
  for karmic builds.

[ Mario Limonciello ]
* New checkout (r23623).
  - Fixes audio issues w/ ac3 audio.
* debian/patches/36_setgroups_too:
  - Set the right args for setgroups. (LP: #524822)
* debian/rules:
  - Explicitly set all shell scripts executable.  Fixes problems on < lucid
    builds.
* debian/control:
  - Correct the replaces statements. (LP: #527288)

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
      allow_ac3_passthru(false),    allow_dts_passthru(false),
499
499
      internal_vol(false),
500
500
      disable_passthru(false),      max_channels(2),
501
 
      last_ac3_channels(0),         dummy_frame(NULL),
 
501
      last_ac3_channels(0),         last_framesRead(0),
 
502
      dummy_frame(NULL),
502
503
      // DVD
503
504
      lastdvdtitle(-1),
504
505
      decodeStillFrame(false),
3951
3952
                        {
3952
3953
                            if (hdr.channels != last_ac3_channels) 
3953
3954
                            {
3954
 
                                last_ac3_channels = curstream->codec->channels = hdr.channels;
 
3955
                                VERBOSE(VB_AUDIO, LOC + QString("AC3 changed from %1 to %2 channels (frame %3)")
 
3956
                                        .arg(last_ac3_channels).arg(hdr.channels).arg(framesRead));
 
3957
                                if ((framesRead - last_framesRead) > AUDIOMAXFRAMES ||
 
3958
                                    hdr.channels < last_ac3_channels)
 
3959
                                    curstream->codec->channels = hdr.channels;
 
3960
                                last_ac3_channels = hdr.channels;
 
3961
                                last_framesRead = framesRead;
3955
3962
                                SetupAudioStream();
3956
3963
                            }
3957
3964
                        }
4302
4309
                    long long temppts = pts;
4303
4310
 
4304
4311
                    // Validate the video pts against the last pts. If it's
4305
 
                    // a little bit smaller or equal, compute it from the last.
4306
 
                    // Otherwise assume a wraparound.
 
4312
                    // a little bit smaller, equal or not available, compute
 
4313
                    // it from the last. Otherwise assume a wraparound.
4307
4314
                    if (!ringBuffer->isDVD() &&
4308
4315
                        temppts <= lastvpts &&
4309
 
                        (temppts + 10000 > lastvpts || temppts < 0))
 
4316
                        (temppts + 10000 > lastvpts || temppts <= 0))
4310
4317
                    {
4311
4318
                        temppts = lastvpts;
4312
 
                        temppts += (long long)(1000 * av_q2d(context->time_base));
4313
 
                        // MPEG2 frames can be repeated, update pts accordingly
4314
 
                        temppts += (long long)(mpa_pic.repeat_pict * 500
4315
 
                                      * av_q2d(curstream->codec->time_base));
 
4319
                        temppts += (long long)(1000 / fps);
 
4320
                        // MPEG2/H264 frames can be repeated, update pts accordingly
 
4321
                        temppts += (long long)(mpa_pic.repeat_pict * 500 / fps);
4316
4322
                    }
4317
4323
 
4318
4324
                    VERBOSE(VB_PLAYBACK+VB_TIMESTAMP, LOC +