]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/switcher.c
Use vlc_memset/vlc_memcpy
[vlc] / modules / stream_out / switcher.c
index 694dcdc764ca2f48064331881309806435ff4351..658d153194865a786b71571c585e5e309d6a3237 100644 (file)
@@ -860,10 +860,8 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
             = id->ff_enc_c->coded_frame->motion_subsample_log2;
         id->p_frame->mb_type = malloc( ((mb_width + 1) * (mb_height + 1) + 1)
                                     * sizeof(uint32_t) );
-        p_stream->p_libvlc->pf_memcpy( id->p_frame->mb_type,
-                                    id->ff_enc_c->coded_frame->mb_type,
-                                    (mb_width + 1) * mb_height
-                                      * sizeof(id->p_frame->mb_type[0]));
+        vlc_memcpy( id->p_frame->mb_type, id->ff_enc_c->coded_frame->mb_type,
+                    (mb_width + 1) * mb_height * sizeof(id->p_frame->mb_type[0]));
 
         for ( i = 0; i < 2; i++ )
         {
@@ -877,24 +875,24 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
             {
                 id->p_frame->motion_val[i] = malloc( 2 * stride * height
                                                 * sizeof(int16_t) );
-                p_stream->p_libvlc->pf_memcpy( id->p_frame->motion_val[i],
-                                     id->ff_enc_c->coded_frame->motion_val[i],
-                                     2 * stride * height * sizeof(int16_t) );
+                vlc_memcpy( id->p_frame->motion_val[i],
+                            id->ff_enc_c->coded_frame->motion_val[i],
+                            2 * stride * height * sizeof(int16_t) );
             }
             if ( id->ff_enc_c->coded_frame->ref_index[i] )
             {
                 id->p_frame->ref_index[i] = malloc( b8_stride * 2 * mb_height
                                                * sizeof(int8_t) );
-                p_stream->p_libvlc->pf_memcpy( id->p_frame->ref_index[i],
-                                 id->ff_enc_c->coded_frame->ref_index[i],
-                                 b8_stride * 2 * mb_height * sizeof(int8_t));
+                vlc_memcpy( id->p_frame->ref_index[i],
+                            id->ff_enc_c->coded_frame->ref_index[i],
+                            b8_stride * 2 * mb_height * sizeof(int8_t));
             }
         }
     }
 #endif
 
     p_out = block_New( p_stream, i_out );
-    p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
+    vlc_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
     p_out->i_length = p_buffer->i_length;
     p_out->i_pts = p_buffer->i_dts;
     p_out->i_dts = p_buffer->i_dts;
@@ -937,7 +935,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id,
         return NULL;
 
     p_out = block_New( p_stream, i_out );
-    p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
+    vlc_memcpy( p_out->p_buffer, id->p_buffer_out, i_out );
     p_out->i_length = p_buffer->i_length;
     p_out->i_pts = p_buffer->i_dts;
     p_out->i_dts = p_buffer->i_dts;