]> git.videolan.org Git - x264.git/commitdiff
Pass through user data
authorKieran Kunhya <kieran@kunhya.com>
Fri, 4 Nov 2011 20:09:13 +0000 (20:09 +0000)
committerJason Garrett-Glaser <jason@x264.com>
Thu, 1 Dec 2011 20:27:45 +0000 (12:27 -0800)
common/frame.c
common/frame.h
encoder/encoder.c
x264.h

index 04e8afaa3abe90d088ff9dc2cd0ebf0432172465..3d826270908707a61852359e3eccac711cb052bc 100644 (file)
@@ -353,6 +353,7 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
     dst->param      = src->param;
     dst->i_pic_struct = src->i_pic_struct;
     dst->extra_sei  = src->extra_sei;
+    dst->opaque     = src->opaque;
 
     uint8_t *pix[3];
     int stride[3];
index 0ee68cb2f3d3ca9402ff3bbf49f372bc0a60d07d..37878f5fd8833073be0ca0013fa2ee256216c932 100644 (file)
@@ -162,6 +162,9 @@ typedef struct x264_frame
 
     /* user sei */
     x264_sei_t extra_sei;
+
+    /* user data */
+    void *opaque;
 } x264_frame_t;
 
 /* synchronized frame list */
index 72d716f2b82cbe9d6d41b70b16b8f243e05de6ca..b1a99e6ece168967be7d55f849602a0e63186f6c 100644 (file)
@@ -3108,6 +3108,8 @@ static int x264_encoder_frame_end( x264_t *h, x264_t *thread_current,
     if( pic_out->i_pts < pic_out->i_dts )
         x264_log( h, X264_LOG_WARNING, "invalid DTS: PTS is less than DTS\n" );
 
+    pic_out->opaque = h->fenc->opaque;
+
     pic_out->img.i_csp = h->fdec->i_csp;
 #if HIGH_BIT_DEPTH
     pic_out->img.i_csp |= X264_CSP_HIGH_DEPTH;
diff --git a/x264.h b/x264.h
index 5e88e48e1c84565560cada435e24762e6c278b93..c95c1f2e13bb92172ffab7d345a3466582cbba53 100644 (file)
--- a/x264.h
+++ b/x264.h
@@ -41,7 +41,7 @@
 
 #include "x264_config.h"
 
-#define X264_BUILD 119
+#define X264_BUILD 120
 
 /* x264_t:
  *      opaque handler for encoder */
@@ -724,8 +724,7 @@ typedef struct
     x264_hrd_t hrd_timing;
     /* In: arbitrary user SEI (e.g subtitles, AFDs) */
     x264_sei_t extra_sei;
-    /* private user data. libx264 doesn't touch this,
-       not even copy it from input to output frames. */
+    /* private user data. copied from input to output frames. */
     void *opaque;
 } x264_picture_t;