aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/recorder
diff options
context:
space:
mode:
Diffstat (limited to 'src/recorder')
-rw-r--r--src/recorder/muxer.c2
-rw-r--r--src/recorder/recorder.c2
-rw-r--r--src/recorder/replay_save.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/recorder/muxer.c b/src/recorder/muxer.c
index ff4ec06..806921d 100644
--- a/src/recorder/muxer.c
+++ b/src/recorder/muxer.c
@@ -197,7 +197,7 @@ bool gsr_recording_output_start(gsr_recording_output *self, const char *filename
bool gsr_recording_output_stop(gsr_recording_output *self) {
bool trailer_written = true;
- if(av_write_trailer(self->av_format_context) != 0) {
+ if(gsr_av_format_context_write_trailer(self->av_format_context) != 0) {
//trailer_written = false;
}
diff --git a/src/recorder/recorder.c b/src/recorder/recorder.c
index 4bffb8e..fc0ccf0 100644
--- a/src/recorder/recorder.c
+++ b/src/recorder/recorder.c
@@ -886,7 +886,7 @@ static void gsr_recorder_stop_recording(gsr_recorder *self) {
gsr_audio_capture_join_threads(&self->audio_capture);
// TODO: Replace this with start_recording_create_steams
- if(!self->settings.is_replaying && av_write_trailer(self->av_format_context) != 0) {
+ if(!self->settings.is_replaying && gsr_av_format_context_write_trailer(self->av_format_context) != 0) {
//fprintf(stderr, "Failed to write trailer\n");
}
diff --git a/src/recorder/replay_save.c b/src/recorder/replay_save.c
index c3a1bea..3251616 100644
--- a/src/recorder/replay_save.c
+++ b/src/recorder/replay_save.c
@@ -96,7 +96,9 @@ static void* replay_save_thread(void *userdata) {
av_packet_rescale_ts(&av_packet, codec_context->time_base, stream->time_base);
const int ret = av_write_frame(self->recording_output.av_format_context, &av_packet);
- if(ret < 0)
+ if(ret >= 0)
+ gsr_av_format_context_mark_packet_written(self->recording_output.av_format_context);
+ else
gsr_log(GSR_LOG_LEVEL_ERROR, "Failed to write frame index %d to muxer, reason: %s (%d)", av_packet.stream_index, gsr_av_error_to_string(ret), ret);
free(replay_packet_data);