Ticket #1041: videobuffers.diff
File videobuffers.diff, 1.0 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/videobuffers.cpp
4 4 #include <unistd.h> 5 5 #include "mythcontext.h" 6 6 #include "videobuffers.h" 7 #include "../libavcodec/avcodec.h" 7 8 8 9 #ifdef USING_XVMC 9 10 #include "videoout_xv.h" // for xvmc stuff … … 1072 1073 uint buf_size = (width * height * bpp + 4/* to round up */) / bpb; 1073 1074 while (bufs.size() < allocSize()) 1074 1075 { 1075 unsigned char *data = new unsigned char[buf_size + 64];1076 unsigned char *data = (unsigned char*)av_malloc(buf_size + 64); 1076 1077 1077 1078 // init buffers (y plane to 0, u/v planes to 127), 1078 1079 // to prevent green screens.. … … 1202 1203 allocated_structs.clear(); 1203 1204 1204 1205 for (uint i = 0; i < allocated_arrays.size(); i++) 1205 delete [] allocated_arrays[i];1206 av_free(allocated_arrays[i]); 1206 1207 allocated_arrays.clear(); 1207 1208 #ifdef USING_XVMC 1208 1209 xvmc_surf_to_frame.clear();