OSDN Git Service

Merge commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Dec 2013 23:32:15 +0000 (00:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Dec 2013 23:32:15 +0000 (00:32 +0100)
* commit 'd7b3ee9a3a03ab88d61a5895fbdbc6689f4dd671':
  lavc: deprecate avcodec_get_frame_defaults().

Conflicts:
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
doc/APIchanges
libavcodec/avcodec.h
libavcodec/utils.c
libavcodec/version.h

diff --cc doc/APIchanges
@@@ -14,13 -12,12 +14,18 @@@ libavutil:     2012-10-2
  
  
  API changes, most recent first:
 +2013-12-xx - xxxxxxx - lavu 52.57.100 - opencl.h
 +  Add av_opencl_benchmark() function.
 +
 +2013-11-xx - xxxxxxx - lavu 52.56.100 - ffversion.h
 +  Moves version.h to libavutil/ffversion.h.
 +  Install ffversion.h and make it public.
  
+ 2013-12-xx - xxxxxxx - lavc 55.28.1 - avcodec.h
+   av_frame_alloc(), av_frame_unref() and av_frame_free() now can and should be
+   used instead of avcodec_alloc_frame(), avcodec_get_frame_defaults() and
+   avcodec_free_frame() respectively. The latter three functions are deprecated.
  2013-11-xx - xxxxxxx- - lavu 52.20.0 - frame.h
    Add AV_FRAME_DATA_STEREO3D value to the AVFrameSideDataType enum and
    stereo3d.h API, that identify codec-independent stereo3d information.
Simple merge
@@@ -1049,14 -801,11 +1049,15 @@@ enum AVPixelFormat avcodec_default_get_
      return fmt[0];
  }
  
+ #if FF_API_AVFRAME_LAVC
  void avcodec_get_frame_defaults(AVFrame *frame)
  {
 -    if (frame->extended_data != frame->data)
 +#if LIBAVCODEC_VERSION_MAJOR >= 55
 +     // extended_data should explicitly be freed when needed, this code is unsafe currently
 +     // also this is not compatible to the <55 ABI/API
 +    if (frame->extended_data != frame->data && 0)
          av_freep(&frame->extended_data);
 +#endif
  
      memset(frame, 0, sizeof(AVFrame));
  
      frame->sample_aspect_ratio = (AVRational) {0, 1 };
      frame->format              = -1; /* unknown */
      frame->extended_data       = frame->data;
 +    av_frame_set_colorspace(frame, AVCOL_SPC_UNSPECIFIED);
  }
  
- #if FF_API_AVFRAME_LAVC
  AVFrame *avcodec_alloc_frame(void)
  {
 -    AVFrame *frame = av_mallocz(sizeof(AVFrame));
 +    AVFrame *frame = av_malloc(sizeof(AVFrame));
  
      if (frame == NULL)
          return NULL;
   * Libavcodec version macros.
   */
  
 +#include "libavutil/avutil.h"
 +
  #define LIBAVCODEC_VERSION_MAJOR 55
 -#define LIBAVCODEC_VERSION_MINOR 28
 -#define LIBAVCODEC_VERSION_MICRO  1
 +#define LIBAVCODEC_VERSION_MINOR  45
- #define LIBAVCODEC_VERSION_MICRO 100
++#define LIBAVCODEC_VERSION_MICRO 101
  
  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                 LIBAVCODEC_VERSION_MINOR, \