Projects
Multimedia
dvswitch-git
happy_gcc.diff
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File happy_gcc.diff of Package dvswitch-git
--- src/connector.cpp | 2 ++ src/dvsource-firewire.cpp | 2 +- src/mixer.cpp | 33 +++++++++++++++++---------------- 3 files changed, 20 insertions(+), 17 deletions(-) Index: dvswitch-0.9-1-da15ba4/src/mixer.cpp =================================================================== --- dvswitch-0.9-1-da15ba4.orig/src/mixer.cpp +++ dvswitch-0.9-1-da15ba4/src/mixer.cpp @@ -468,14 +468,14 @@ namespace // 4: LTC bits 48-51, 56-59 // bits 0-5: hour part (BCD) // the remaining bits are meaningless in DV and we use zeroes uint8_t timecode[DIF_PACK_SIZE] = { 0x13, - bcd(frame_num % frame_rate) | (1 << 6), - bcd(frame_num / frame_rate % 60), - bcd(frame_num / (60 * frame_rate) % 60), - bcd(frame_num / (60 * 60 * frame_rate) % 24) + (uint8_t)bcd(frame_num % frame_rate) | (1 << 6), + (uint8_t)bcd(frame_num / frame_rate % 60), + (uint8_t)bcd(frame_num / (60 * frame_rate) % 60), + (uint8_t)bcd(frame_num / (60 * 60 * frame_rate) % 24) }; // Record date format: // 0: pack id = 0x62 (video) or 0x52 (audio) // 1: some kind of time zone indicator or 0xff for unknown @@ -485,20 +485,20 @@ namespace // bits 0-4: month part (BCD) // 4: year part (BCD) uint8_t video_record_date[DIF_PACK_SIZE] = { 0x62, 0xff, - bcd(now_tm.tm_mday), - bcd(1 + now_tm.tm_mon), - bcd(now_tm.tm_year % 100) + (uint8_t)bcd(now_tm.tm_mday), + (uint8_t)bcd(1 + now_tm.tm_mon), + (uint8_t)bcd(now_tm.tm_year % 100) }; uint8_t audio_record_date[DIF_PACK_SIZE] = { 0x52, 0xff, - bcd(now_tm.tm_mday), - bcd(1 + now_tm.tm_mon), - bcd(now_tm.tm_year % 100) + (uint8_t)bcd(now_tm.tm_mday), + (uint8_t)bcd(1 + now_tm.tm_mon), + (uint8_t)bcd(now_tm.tm_year % 100) }; // Record time format (similar to timecode format): // 0: pack id = 0x63 (video) or 0x53 (audio) // 1: bits 6-7: reserved, set to 1 @@ -510,20 +510,20 @@ namespace // 4: bits 6-7: unused? reserved? // bits 0-5: hour part (BCD) uint8_t video_record_time[DIF_PACK_SIZE] = { 0x63, 0xff, - bcd(now_tm.tm_sec), - bcd(now_tm.tm_min), - bcd(now_tm.tm_hour) + (uint8_t)bcd(now_tm.tm_sec), + (uint8_t)bcd(now_tm.tm_min), + (uint8_t)bcd(now_tm.tm_hour) }; uint8_t audio_record_time[DIF_PACK_SIZE] = { 0x53, 0xff, - bcd(now_tm.tm_sec), - bcd(now_tm.tm_min), - bcd(now_tm.tm_hour) + (uint8_t)bcd(now_tm.tm_sec), + (uint8_t)bcd(now_tm.tm_min), + (uint8_t)bcd(now_tm.tm_hour) }; // In DIFs 1 and 2 (subcode) of sequence 6 onward: // - Write timecode at offset 6 and 30 // - Write video record date at offset 14 and 38 @@ -901,10 +901,11 @@ void mixer::run_mixer() enc->sample_aspect_ratio.den *= 41; enc->time_base.num = system->frame_rate_denom; enc->time_base.den = system->frame_rate_numer; mixed_raw->header.pts = serial_num; mixed_dv = allocate_dv_frame(); + // FIXME: deprecated. use avcodec_encode_video2 instead: int out_size = avcodec_encode_video(enc, mixed_dv->buffer, system->size, &mixed_raw->header); assert(size_t(out_size) == system->size); mixed_dv->serial_num = serial_num; Index: dvswitch-0.9-1-da15ba4/src/dvsource-firewire.cpp =================================================================== --- dvswitch-0.9-1-da15ba4.orig/src/dvsource-firewire.cpp +++ dvswitch-0.9-1-da15ba4/src/dvsource-firewire.cpp @@ -84,11 +84,11 @@ static int setup_tally_pipe() if (dup2(pipefd[0], 0) < 0) { perror("dup2"); exit(EXIT_FAILURE); } - execl(tally_script.c_str(), (char*)NULL); + execl(tally_script.c_str(), tally_script.c_str(), (char*)NULL); // only returns in case of error perror("ERROR: exec"); return -1; default: close(pipefd[0]); Index: dvswitch-0.9-1-da15ba4/src/connector.cpp =================================================================== --- dvswitch-0.9-1-da15ba4.orig/src/connector.cpp +++ dvswitch-0.9-1-da15ba4/src/connector.cpp @@ -134,10 +134,12 @@ void connector::source_connection::handl handle_frame, &conn, handle_close, &conn); } void connector::source_connection::handle_close(void * opaque) { + // FIXME: gcc-4.7.1 says: + // deleting object of polymorphic class type ‘connector::source_connection’ which has non-virtual destructor might cause undefined behaviour delete static_cast<source_connection *>(opaque); } connector::connector(mixer & mixer) : mixer_(mixer),
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.