OSDN Git Service

Merge commit '728c4658563dc82115ade0f1679679eddb7be5ff'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 14 Nov 2013 12:08:36 +0000 (13:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 14 Nov 2013 12:08:36 +0000 (13:08 +0100)
* commit '728c4658563dc82115ade0f1679679eddb7be5ff':
  vdpau: add a constructor for AVVDPAUContext.

Conflicts:
libavcodec/vdpau.h

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

diff --cc doc/APIchanges
@@@ -17,9 -15,10 +17,11 @@@ API changes, most recent first
  
  2013-11-xx - xxxxxxx - lavc 55.26.0 - vdpau.h
    Add av_vdpau_get_profile().
+   Add av_vdpau_alloc_context(). This function must from now on be
+   used for allocating AVVDPAUContext.
  
 -2013-11-xx - xxxxxxx - lavc 55.25.0 - avcodec.h
 +2013-11-xx - xxxxxxx - lavc 55.41.100 / 55.25.0 - avcodec.h
 +                       lavu 52.51.100 - frame.h
    Add ITU-R BT.2020 and other not yet included values to color primaries,
    transfer characteristics and colorspaces.
  
   * @{
   */
  
-     return av_mallocz(sizeof(AVVDPAUContext));
 +AVVDPAUContext *av_alloc_vdpaucontext(void)
 +{
++    return av_vdpau_alloc_context();
 +}
 +
 +MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
 +
  int ff_vdpau_common_start_frame(Picture *pic,
                                  av_unused const uint8_t *buffer,
                                  av_unused uint32_t size)
@@@ -136,16 -131,13 +140,23 @@@ typedef struct AVVDPAUContext 
  } AVVDPAUContext;
  
  /**
 + * @brief allocation function for AVVDPAUContext
 + *
 + * Allows extending the struct without breaking API/ABI
 + */
 +AVVDPAUContext *av_alloc_vdpaucontext(void);
 +
 +AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
 +void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
 +
 +/**
+  * Allocate an AVVDPAUContext.
+  *
+  * @return Newly-allocated AVVDPAUContext or NULL on failure.
+  */
+ AVVDPAUContext *av_vdpau_alloc_context(void);
+ /**
   * Get a decoder profile that should be used for initializing a VDPAU decoder.
   * Should be called from the AVCodecContext.get_format() callback.
   *