Ticket #4271: legacy.patch
File legacy.patch, 14.6 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
3823 3823 3824 3824 enc_len = min((uint)enc_len, block_len - 8); 3825 3825 3826 swab( data, ucsamples + 8, enc_len);3826 swab((char*)data, (char*)(ucsamples + 8), enc_len); 3827 3827 3828 3828 // the following values come from libmpcodecs/ad_hwac3.c in mplayer. 3829 3829 // they form a valid IEC958 AC3 header. -
libs/libmythtv/frame.h
87 87 vf->repeat_pict = 0; 88 88 vf->forcekey = 0; 89 89 90 bzero(vf->priv, 4 * sizeof(unsigned char *));90 memset(vf->priv, 0, 4 * sizeof(unsigned char *)); 91 91 92 92 if (p) 93 93 { … … 143 143 unsigned int ysize = vf->width * vf->height; 144 144 unsigned int uvsize = ysize >> 2; 145 145 146 bzero( vf->buf + vf->offsets[0], ysize);146 memset(vf->buf + vf->offsets[0], 0, ysize); 147 147 memset(vf->buf + vf->offsets[1], 127, uvsize); 148 148 memset(vf->buf + vf->offsets[2], 127, uvsize); 149 149 } -
libs/libmythtv/filtermanager.cpp
1 #include <dlfcn.h>2 1 #include <iostream> 3 2 #include <qdir.h> 4 3 #include <qstringlist.h> … … 106 105 if (handle) 107 106 { 108 107 FiltInfo = (FilterInfo *)dlsym(handle, "filter_table"); 109 if ( dlerror() == NULL)108 if (FiltInfo != NULL) 110 109 { 111 110 for (; FiltInfo->symbol != NULL; FiltInfo++) 112 111 { … … 414 413 int &height, char *opts) 415 414 { 416 415 void *handle; 417 const char *error;418 416 VideoFilter *Filter; 419 417 VideoFilter *(*InitFilter)(int, int, int *, int *, char *); 420 418 … … 441 439 442 440 handle = dlopen(FiltInfo->libname, RTLD_NOW); 443 441 444 if ( (error = dlerror()))442 if (handle == NULL) 445 443 { 446 444 VERBOSE(VB_IMPORTANT, QString("FilterManager: unable to load " 447 445 "shared library '%1', dlopen reports error '%2'") 448 446 .arg(FiltInfo->libname) 449 .arg( error));447 .arg(dlerror())); 450 448 return NULL; 451 449 } 452 450 453 if (handle == NULL)454 {455 VERBOSE(VB_IMPORTANT, QString("FilterManager: dlopen did not report "456 "an error, but returned a NULL handle for shared library '%1'")457 .arg(FiltInfo->libname));458 return NULL;459 }460 461 451 InitFilter = 462 452 (VideoFilter * (*)(int, int, int *, int *, char *))dlsym(handle, 463 453 FiltInfo-> 464 454 symbol); 465 455 466 if ( (error = dlerror()))456 if (InitFilter == NULL) 467 457 { 468 458 VERBOSE(VB_IMPORTANT, QString("FilterManager: unable to load symbol " 469 459 "'%1' from shared library '%2', dlopen reports error '%3'") 470 460 .arg(FiltInfo->symbol) 471 461 .arg(FiltInfo->libname) 472 .arg( error));462 .arg(dlerror())); 473 463 return NULL; 474 464 } 475 465 476 if (InitFilter == NULL)477 {478 VERBOSE(VB_IMPORTANT, QString("FilterManager: dlopen did not report "479 "an error, but returned NULL for symbol '%1' from shared "480 "library '%2'")481 .arg(FiltInfo->symbol)482 .arg(FiltInfo->libname));483 return NULL;484 }485 486 466 Filter = (*InitFilter)(inpixfmt, outpixfmt, &width, &height, opts); 487 467 488 468 if (Filter == NULL) -
libs/libmythtv/mpeg/mpegstreamdata.cpp
69 69 _invalid_pat_seen(false), _invalid_pat_warning(false) 70 70 { 71 71 _local_utc_offset = calc_utc_offset(); 72 bzero(_si_time_offsets, sizeof(_si_time_offsets));72 memset(_si_time_offsets, 0, sizeof(_si_time_offsets)); 73 73 74 74 AddListeningPID(MPEG_PAT_PID); 75 75 } -
libs/libmythtv/mpeg/mpegtables.h
509 509 const QString toString(void) const; 510 510 511 511 private: 512 static ProgramAssociationTable* CreateBlank(bool small = true);512 static ProgramAssociationTable* CreateBlank(bool _small = true); 513 513 }; 514 514 515 515 /** \class ProgramMapTable … … 660 660 memcpy(psipdata() + 4, streamInfo, infoLength); 661 661 } 662 662 663 static ProgramMapTable* CreateBlank(bool small = true);663 static ProgramMapTable* CreateBlank(bool _small = true); 664 664 665 665 static const uint pmt_header = 4; // minimum PMT header offset 666 666 mutable vector<unsigned char*> _ptrs; // used to parse -
libs/libmythtv/mpeg/mpegtables.cpp
236 236 return true; 237 237 } 238 238 239 ProgramAssociationTable* ProgramAssociationTable::CreateBlank(bool small)239 ProgramAssociationTable* ProgramAssociationTable::CreateBlank(bool _small) 240 240 { 241 (void) small; // currently always a small packet..241 (void) _small; // currently always a small packet.. 242 242 TSPacket *tspacket = TSPacket::CreatePayloadOnlyPacket(); 243 243 memcpy(tspacket->data() + sizeof(TSHeader) + 1/* start of field pointer */, 244 244 DEFAULT_PAT_HEADER, sizeof(DEFAULT_PAT_HEADER)); … … 286 286 return pat; 287 287 } 288 288 289 ProgramMapTable* ProgramMapTable::CreateBlank(bool small)289 ProgramMapTable* ProgramMapTable::CreateBlank(bool _small) 290 290 { 291 291 ProgramMapTable *pmt = NULL; 292 292 TSPacket *tspacket = TSPacket::CreatePayloadOnlyPacket(); 293 293 memcpy(tspacket->data() + sizeof(TSHeader) + 1/* start of field pointer */, 294 294 DEFAULT_PMT_HEADER, sizeof(DEFAULT_PMT_HEADER)); 295 295 296 if ( small)296 if (_small) 297 297 { 298 298 PSIPTable psip = PSIPTable::View(*tspacket); 299 299 psip.SetLength(len_for_alloc[0]); -
libs/libmythtv/cc608decoder.cpp
35 35 txtmode[i*2+1] = 0; 36 36 } 37 37 38 bzero(lastrow,sizeof(lastrow));39 bzero(newrow,sizeof(newrow));40 bzero(newcol,sizeof(newcol));41 bzero(timecode, sizeof(timecode));42 bzero(row,sizeof(row));43 bzero(col,sizeof(col));44 bzero(rowcount, sizeof(rowcount));45 bzero(style,sizeof(style));46 bzero(linecont, sizeof(linecont));47 bzero(resumetext, sizeof(resumetext));48 bzero(lastclr,sizeof(lastclr));38 memset(lastrow, 0, sizeof(lastrow)); 39 memset(newrow, 0, sizeof(newrow)); 40 memset(newcol, 0, sizeof(newcol)); 41 memset(timecode, 0, sizeof(timecode)); 42 memset(row, 0, sizeof(row)); 43 memset(col, 0, sizeof(col)); 44 memset(rowcount, 0, sizeof(rowcount)); 45 memset(style, 0, sizeof(style)); 46 memset(linecont, 0, sizeof(linecont)); 47 memset(resumetext, 0, sizeof(resumetext)); 48 memset(lastclr, 0, sizeof(lastclr)); 49 49 50 50 for (uint i = 0; i < 8; i++) 51 51 ccbuf[i] = ""; … … 65 65 stdchar[127] = 0x2588; /* full block */ 66 66 67 67 // VPS data 68 bzero(vps_pr_label, sizeof(vps_pr_label));69 bzero(vps_label,sizeof(vps_label));68 memset(vps_pr_label, 0, sizeof(vps_pr_label)); 69 memset(vps_label, 0, sizeof(vps_label)); 70 70 71 71 // XDS data 72 bzero(xds_rating, sizeof(uint) * 2 * 4);72 memset(xds_rating, 0, sizeof(uint) * 2 * 4); 73 73 for (uint i = 0; i < 2; i++) 74 74 { 75 75 xds_rating_systems[i] = 0; -
libs/libavformat/utils.c
2802 2802 2803 2803 int64_t parse_date(const char *datestr, int duration) 2804 2804 { 2805 struct tm time_r;2806 2805 const char *p; 2807 2806 int64_t t; 2808 2807 struct tm dt; … … 2847 2846 * current year-month-day time */ 2848 2847 if (!q) { 2849 2848 if (is_utc) { 2850 dt = *gmtime _r(&now, &time_r);2849 dt = *gmtime(&now); 2851 2850 } else { 2852 dt = *localtime _r(&now, &time_r);2851 dt = *localtime(&now); 2853 2852 } 2854 2853 dt.tm_hour = dt.tm_min = dt.tm_sec = 0; 2855 2854 } else { -
libs/libmyth/audiooutputbase.cpp
60 64 pthread_mutex_init(&avsync_lock, NULL); 61 65 pthread_cond_init(&audio_bufsig, NULL); 62 66 63 output_audio = 0; // TODO FIXME Not POSIX compatible! 67 memset(&output_audio, 0, sizeof(pthread_t)); 68 memset(&src_data, 0, sizeof(SRC_DATA)); 69 memset(src_in, 0, sizeof(float) * AUDIO_SRC_IN_SIZE); 70 memset(src_out, 0, sizeof(float) * AUDIO_SRC_OUT_SIZE); 71 memset(tmp_buff, 0, sizeof(short) * AUDIO_TMP_BUF_SIZE); 72 memset(&audiotime_updated, 0, sizeof(audiotime_updated)); 73 memset(audiobuffer, 0, sizeof(char) * AUDBUFSIZE); 64 74 65 bzero(&src_data, sizeof(SRC_DATA));66 bzero(src_in, sizeof(float) * AUDIO_SRC_IN_SIZE);67 bzero(src_out, sizeof(float) * AUDIO_SRC_OUT_SIZE);68 bzero(tmp_buff, sizeof(short) * AUDIO_TMP_BUF_SIZE);69 bzero(&audiotime_updated, sizeof(audiotime_updated));70 bzero(audiobuffer, sizeof(char) * AUDBUFSIZE);71 72 75 // You need to call Reconfigure from your concrete class. 73 76 // Reconfigure(laudio_bits, laudio_channels, 74 77 // laudio_samplerate, laudio_passthru); … … 246 249 247 250 void AudioOutputBase::StopOutputThread(void) 248 251 { 252 #ifdef CONFIG_MINGW 253 if (output_audio.p) 254 #else 249 255 if (output_audio) 256 #endif 250 257 { 251 258 pthread_join(output_audio, NULL); 252 output_audio = 0;259 memset(&output_audio, 0, sizeof(pthread_t)); 253 260 } 254 261 } 255 262 -
libs/libmythdvdnav/searching.c
120 120 } 121 121 122 122 dvdnav_status_t dvdnav_time_search(dvdnav_t *this, 123 uint64_t time, uint search_to_nearest_cell) {123 uint64_t time, uint32_t search_to_nearest_cell) { 124 124 125 125 uint64_t target = time; 126 126 uint64_t length = 0; -
libs/libmythdvdnav/dvdnav.h
367 365 * Otherwise tries to guess the nearest VOBU by calculating an offset. 368 366 */ 369 367 dvdnav_status_t dvdnav_time_search(dvdnav_t *self, 370 uint64_t time, uint search_to_nearest_cell);368 uint64_t time, uint32_t search_to_nearest_cell); 371 369 372 370 int dvdnav_time_search_within_cell(dvdnav_t *self, 373 371 int relative_time); -
libs/libmythupnp/ssdp.cpp
53 53 54 54 // Setup SearchSocket 55 55 56 m_Sockets[ SocketIdx_Search ]->bind( INADDR_ANY, m_nSearchPort );56 m_Sockets[ SocketIdx_Search ]->bind( (Q_UINT32)INADDR_ANY, m_nSearchPort ); 57 57 58 58 m_pNotifyTask = NULL; 59 59 -
programs/mythfrontend/main.cpp
1273 1273 if (status) 1274 1274 { 1275 1275 perror("pthread_create"); 1276 priv_thread = 0;1276 memset(&priv_thread, 0, sizeof(pthread_t)); 1277 1277 } 1278 1278 setuid(getuid()); 1279 1279 -
programs/mythtv/main.cpp
232 236 if (status) 233 237 { 234 238 perror("pthread_create"); 235 priv_thread = 0;239 memset(&priv_thread, 0, sizeof(pthread_t)); 236 240 } 237 241 setuid(getuid()); 238 242 -
filters/quickdnr/filter_quickdnr.c
469 469 return NULL; 470 470 } 471 471 472 bzero(filter, sizeof(ThisFilter));472 memset(filter, 0, sizeof(ThisFilter)); 473 473 filter->vf.cleanup = &cleanup; 474 474 filter->Luma_threshold1 = LUMA_THRESHOLD1_DEFAULT; 475 475 filter->Chroma_threshold1 = CHROMA_THRESHOLD1_DEFAULT; -
filters/ivtc/filter_ivtc.c
206 206 return NULL; 207 207 } 208 208 209 bzero (filter, sizeof (ThisFilter));209 memset (filter, 0, sizeof (ThisFilter)); 210 210 filter->progressive_frame_seen = 0; 211 211 filter->interlaced_frame_seen = 0; 212 212 filter->apply_filter = 0; -
filters/denoise3d/filter_denoise3d.c
408 408 return NULL; 409 409 } 410 410 411 bzero(filter, sizeof (ThisFilter));411 memset(filter, 0, sizeof (ThisFilter)); 412 412 413 413 filter->vf.filter = &denoise3DFilter; 414 414 filter->vf.cleanup = &Denoise3DFilterCleanup; -
programs/mythfrontend/globalsettings.cpp
4610 4626 4611 4627 theme->addChild(new ThemeSelector("Theme")); 4612 4628 4613 HorizontalConfigurationGroup * grp1 =4629 HorizontalConfigurationGroup *hgrp1 = 4614 4630 new HorizontalConfigurationGroup(false, false, false, false); 4615 grp1->addChild(RandomTheme());4616 grp1->addChild(ThemeCacheSize());4617 theme->addChild( grp1);4631 hgrp1->addChild(RandomTheme()); 4632 hgrp1->addChild(ThemeCacheSize()); 4633 theme->addChild(hgrp1); 4618 4634 4619 4635 theme->addChild(ThemePainter()); 4620 4636 theme->addChild(new StyleSetting());