On 07/19/2016 11:33 PM, Josh de Kock wrote:
--- libavformat/libopenmpt.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
+ { "subsong", "set subsong", OFFSET(subsong), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, INT_MAX, A | D, "layout"}, + { "all", "all", 0, AV_OPT_TYPE_CONST, { .i64 = -1}, 0, 0, A | D, "layout" }, + { "auto", "auto", 0, AV_OPT_TYPE_CONST, { .i64 = -2}, 0, 0, A | D, "layout" },
.unit = "layout"? Shouldn't this be called "subsong"?
+ if (openmpt->subsong >= openmpt_module_get_num_subsongs(openmpt->module)) { + av_log(s, AV_LOG_ERROR, "Invalid subsong index: %d\n", openmpt->subsong); + return AVERROR(EINVAL); + }
Leaks openmpt->module in error path.
+ ret = openmpt_module_select_subsong(openmpt->module, openmpt->subsong); + if (!ret){ + av_log(s, AV_LOG_ERROR, "Could not select requested subsong: %d", openmpt->subsong); + return AVERROR(EINVAL); + }
Leaks openmpt->module in error path. Regards, Jörn _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel