[vlc-commits] x265: never prepend SPS/PPS/VPS to frames

Rafaël Carré git at videolan.org
Thu Apr 17 15:47:07 CEST 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Apr 17 10:04:59 2014 +0200| [be0796a6f82750c1cb0fac3db5a4cee13c8fb70c] | committer: Rafaël Carré

x265: never prepend SPS/PPS/VPS to frames

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be0796a6f82750c1cb0fac3db5a4cee13c8fb70c
---

 modules/codec/x265.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/modules/codec/x265.c b/modules/codec/x265.c
index e25f770..dff438d 100644
--- a/modules/codec/x265.c
+++ b/modules/codec/x265.c
@@ -97,19 +97,12 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
     for (uint32_t i = 0; i < i_nal; i++)
         i_out += nal[i].sizeBytes;
 
-    int i_extra = 0;
-    if (IS_X265_TYPE_I(pic.sliceType))
-        i_extra = p_enc->fmt_out.i_extra;
-
-    block_t *p_block = block_Alloc(i_extra + i_out);
+    block_t *p_block = block_Alloc(i_out);
     if (!p_block)
         return NULL;
 
-    if (i_extra)
-       memcpy(p_block->p_buffer, p_enc->fmt_out.p_extra, i_extra);
-
     /* all payloads are sequentially laid out in memory */
-    memcpy(p_block->p_buffer + i_extra, nal[0].payload, i_out);
+    memcpy(p_block->p_buffer, nal[0].payload, i_out);
 
     /* This isn't really valid for streams with B-frames */
     p_block->i_length = CLOCK_FREQ *



More information about the vlc-commits mailing list