Skip to content

Commit 9bcd6c1

Browse files
committed
Fixed a bug in SQLite metadata writeField that was failing to update field data in tools like ld-process-vbi (field data was not being updated)
1 parent 3d583db commit 9bcd6c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/library/tbc/sqliteio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ bool SqliteWriter::writeField(int captureId, int fieldId, int audioSamples, int
593593
bool ntscIsVideoIdDataValid, int ntscVideoIdData, bool ntscWhiteFlag)
594594
{
595595
QSqlQuery query(db);
596-
query.prepare("INSERT INTO field_record (capture_id, field_id, audio_samples, decode_faults, "
596+
query.prepare("INSERT OR REPLACE INTO field_record (capture_id, field_id, audio_samples, decode_faults, "
597597
"disk_loc, efm_t_values, field_phase_id, file_loc, is_first_field, "
598598
"median_burst_ire, pad, sync_conf, ntsc_is_fm_code_data_valid, "
599599
"ntsc_fm_code_data, ntsc_field_flag, ntsc_is_video_id_data_valid, "
@@ -705,7 +705,7 @@ bool SqliteWriter::writeFieldClosedCaption(int captureId, int fieldId, int data0
705705
bool SqliteWriter::writeFieldDropouts(int captureId, int fieldId, int startx, int endx, int fieldLine)
706706
{
707707
QSqlQuery query(db);
708-
query.prepare("INSERT INTO drop_outs (capture_id, field_id, startx, endx, field_line) VALUES (?, ?, ?, ?, ?)");
708+
query.prepare("INSERT OR REPLACE INTO drop_outs (capture_id, field_id, startx, endx, field_line) VALUES (?, ?, ?, ?, ?)");
709709

710710
query.addBindValue(captureId);
711711
query.addBindValue(fieldId);

0 commit comments

Comments
 (0)