summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg
diff options
context:
space:
mode:
authorddorwin <ddorwin@chromium.org>2015-11-12 21:47:15 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-13 05:48:48 +0000
commitbc4d25de48ace05a44a5953ab54670efa02e9d47 (patch)
tree76417a370878a2cbd079c02615e756cb644e116e /media/ffmpeg
parent94a4f8863e29f28060662ccbee973fe640d08626 (diff)
downloadchromium_src-bc4d25de48ace05a44a5953ab54670efa02e9d47.zip
chromium_src-bc4d25de48ace05a44a5953ab54670efa02e9d47.tar.gz
chromium_src-bc4d25de48ace05a44a5953ab54670efa02e9d47.tar.bz2
Roll FFmpeg for M48
Changes: * av_free_packet => av_packet_unref The former is deprecated in upstream FFmpeg. * Remove unnecessary uses of av_dup_packet(). * Use max_analyze_duration instead of max_analyze_duration2. The latter has been removed and was likely part of a transition process. * Disable FF_API_CONVERGENCE_DURATION. In upstream FFmpeg, it enables deprecated attributes, causing the implicit copy constructor to fail due to a deprecation warning. * Disable FF_API_AVPACKET_OLD_API to avoid spammy deprecation warnings in upstream FFmpeg. BUG=551980 Review URL: https://codereview.chromium.org/1436943006 Cr-Commit-Position: refs/heads/master@{#359500}
Diffstat (limited to 'media/ffmpeg')
-rw-r--r--media/ffmpeg/ffmpeg_common.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 299946b..7938a32 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -20,9 +20,16 @@
// Include FFmpeg header files.
extern "C" {
// Disable deprecated features which result in spammy compile warnings. This
-// list of defines must mirror those in the 'defines' section of the ffmpeg.gyp
-// file or the headers below will generate different structures.
-// None currently.
+// list of defines must mirror those in the 'defines' section of BUILD.gn file &
+// ffmpeg.gyp file or the headers below will generate different structures!
+#define FF_API_CONVERGENCE_DURATION 0
+// Upstream libavcodec/utils.c still uses the deprecated
+// av_dup_packet(), causing deprecation warnings.
+// The normal fix for such things is to disable the feature as below,
+// but the upstream code does not yet compile with it disabled.
+// (In this case, the fix is replacing the call with a new function.)
+// In the meantime, we directly disable those warnings in the C file.
+//#define FF_API_AVPACKET_OLD_API 0
// Temporarily disable possible loss of data warning.
// TODO(scherkus): fix and upstream the compiler warnings.
@@ -54,7 +61,7 @@ inline void ScopedPtrAVFree::operator()(void* x) const {
inline void ScopedPtrAVFreePacket::operator()(void* x) const {
AVPacket* packet = static_cast<AVPacket*>(x);
- av_free_packet(packet);
+ av_packet_unref(packet);
delete packet;
}