Bug 1275339: [ffmpeg] P2. Fetch avcodec_free_frame in libavcodec. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 11 Jun 2016 11:04:14 +0100
changeset 301617 9ddfddc33c569553a8cbf96cd99277d176f253dd
parent 301616 1bafbbad7fa45220c76dfae1f0419026408d221a
child 301618 d6d4ed5fb7a31e523976aef0047ec93ba544925e
push id30336
push usercbook@mozilla.com
push dateSun, 12 Jun 2016 09:26:58 +0000
treeherdermozilla-central@016e0f47e8ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1275339
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275339: [ffmpeg] P2. Fetch avcodec_free_frame in libavcodec. r=cpearce avcodec_free_frame was incorrectly looked in libavuti. On Linux where this code is used, it makes no difference really but for clarity sake. MozReview-Commit-ID: DC1WJAAKiE4
dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
@@ -106,20 +106,20 @@ FFmpegLibWrapper::Link()
   AV_FUNC(avcodec_open2, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(avcodec_register_all, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(av_init_packet, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(av_parser_init, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(av_parser_close, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(av_parser_parse2, AV_FUNC_AVCODEC_ALL)
   AV_FUNC(avcodec_alloc_frame, (AV_FUNC_53 | AV_FUNC_54))
   AV_FUNC(avcodec_get_frame_defaults, (AV_FUNC_53 | AV_FUNC_54))
+  AV_FUNC(avcodec_free_frame, AV_FUNC_54)
   AV_FUNC(av_log_set_level, AV_FUNC_AVUTIL_ALL)
   AV_FUNC(av_malloc, AV_FUNC_AVUTIL_ALL)
   AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL)
-  AV_FUNC(avcodec_free_frame, AV_FUNC_AVUTIL_54)
   AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
   AV_FUNC(av_frame_free, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
   AV_FUNC(av_frame_unref, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
 #undef AV_FUNC
 
   avcodec_register_all();
 #ifdef DEBUG
   av_log_set_level(AV_LOG_DEBUG);
--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
+++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.h
@@ -49,25 +49,24 @@ struct FFmpegLibWrapper
   void (*av_init_packet)(AVPacket* pkt);
   AVCodecParserContext* (*av_parser_init)(int codec_id);
   void (*av_parser_close)(AVCodecParserContext* s);
   int (*av_parser_parse2)(AVCodecParserContext* s, AVCodecContext* avctx, uint8_t** poutbuf, int* poutbuf_size, const uint8_t* buf, int buf_size, int64_t pts, int64_t dts, int64_t pos);
 
   // only used in libavcodec <= 54
   AVFrame* (*avcodec_alloc_frame)();
   void (*avcodec_get_frame_defaults)(AVFrame* pic);
+  // libavcodec v54 only
+  void (*avcodec_free_frame)(AVFrame** frame);
 
   // libavutil
   void (*av_log_set_level)(int level);
   void*	(*av_malloc)(size_t size);
   void (*av_freep)(void *ptr);
 
-  // libavutil v54 only
-  void (*avcodec_free_frame)(AVFrame** frame);
-
   // libavutil v55 and later only
   AVFrame* (*av_frame_alloc)();
   void (*av_frame_free)(AVFrame** frame);
   void (*av_frame_unref)(AVFrame* frame);
 
   PRLibrary* mAVCodecLib;
   PRLibrary* mAVUtilLib;