Commit 3a7b3443 authored by dalecurtis@google.com's avatar dalecurtis@google.com

Revert 220237 "Revert 220228 "FFmpeg roll for M31.""

> Revert 220228 "FFmpeg roll for M31."
> 
> Causing compile failure on "Google Chrome ChromeOS"
> http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20ChromeOS/builds/57680
> 
> > FFmpeg roll for M31.
> > 
> > BUG=none
> > TEST=asan media_unittests, ffmpeg_regression_tests + manual.
> > 
> > Review URL: https://chromiumcodereview.appspot.com/23172019
> 
> TBR=dalecurtis@chromium.org
> 
> Review URL: https://codereview.chromium.org/23753002

Builder has been upgraded to handle gcc 4.6+ constructurs.

TBR=hashimoto@chromium.org
BUG=263385,281764

Review URL: https://codereview.chromium.org/23703009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221794 0039d316-1c4b-4281-b951-d872f2087c98
parent 8a16e9b9
......@@ -25,8 +25,8 @@ vars = {
# These two FFmpeg variables must be updated together. One is used for SVN
# checkouts and the other for Git checkouts.
"ffmpeg_revision": "214392",
"ffmpeg_hash": "894e6f715645528e815aee2dad45b59704238dcd",
"ffmpeg_revision": "219831",
"ffmpeg_hash": "feb5bc7d3d1fc66d9c52dc316479231b02cbdac1",
"sfntly_revision": "134",
"skia_revision": "11121",
......
......@@ -357,6 +357,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder() {
codec_context_->opaque = this;
codec_context_->get_buffer2 = GetAudioBufferImpl;
codec_context_->refcounted_frames = 1;
AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec || avcodec_open2(codec_context_, codec, NULL) < 0) {
......@@ -396,10 +397,8 @@ void FFmpegAudioDecoder::ReleaseFFmpegResources() {
av_free(codec_context_);
}
if (av_frame_) {
av_free(av_frame_);
av_frame_ = NULL;
}
if (av_frame_)
av_frame_free(&av_frame_);
}
void FFmpegAudioDecoder::ResetTimestampState() {
......@@ -426,9 +425,6 @@ void FFmpegAudioDecoder::RunDecodeLoop(
// want to hand it to the decoder at least once, otherwise we would end up
// skipping end of stream packets since they have a size of zero.
do {
// Reset frame to default values.
avcodec_get_frame_defaults(av_frame_);
int frame_decoded = 0;
int result = avcodec_decode_audio4(
codec_context_, av_frame_, &frame_decoded, &packet);
......@@ -487,6 +483,7 @@ void FFmpegAudioDecoder::RunDecodeLoop(
// This is an unrecoverable error, so bail out.
QueuedAudioBuffer queue_entry = { kDecodeError, NULL };
queued_audio_.push_back(queue_entry);
av_frame_unref(av_frame_);
break;
}
......@@ -509,8 +506,11 @@ void FFmpegAudioDecoder::RunDecodeLoop(
}
decoded_frames = output->frame_count();
av_frame_unref(av_frame_);
}
// WARNING: |av_frame_| no longer has valid data at this point.
if (decoded_frames > 0) {
// Set the timestamp/duration once all the extra frames have been
// discarded.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment