Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/mod/applications/mod_av/avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,12 +2127,12 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
const char *tmp = NULL;
#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)
AVOutputFormat *fmt;
AVDictionary *dict = NULL; // Might be useful to set some options from what we got from the cmd
#else
const AVOutputFormat *fmt;
enum AVCodecID video_codec = AV_CODEC_ID_NONE;
enum AVCodecID audio_codec = AV_CODEC_ID_NONE;
#endif
AVDictionary *dict = NULL; // Might be useful to set some options from what we got from the cmd
const char *format = NULL;
int ret;
char file[1024];
Expand Down Expand Up @@ -2319,15 +2319,9 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
.opaque = context,
};

#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)
av_dict_set(&dict, "rw_timeout", context->rw_timeout, 0);
#endif
context->connect_start_time = switch_time_now() / 1000;
#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)
ret = avio_open2(&context->fc->pb, file, AVIO_FLAG_WRITE, &cb, &dict);
#else
ret = avio_open2(&context->fc->pb, file, AVIO_FLAG_WRITE, &cb, NULL);
#endif
} else {
ret = avio_open(&context->fc->pb, file, AVIO_FLAG_WRITE);
}
Expand Down Expand Up @@ -2513,11 +2507,9 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
switch_buffer_destroy(&context->audio_buffer);
}

#if (LIBAVFORMAT_VERSION_MAJOR < LIBAVFORMAT_V)
if (dict) {
av_dict_free(&dict);
}
#endif

return status;
}
Expand Down
Loading