<html>
<head>
<title>Samsung Enterprise Portal mySingle</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style id="mysingle_style" type="text/css">
 p, td, li {font-family:Arial, arial; font-size:9pt; margin-top:5px;margin-bottom:5px;} body{margin:10px 10px 10px 10px; line-height:1.4; font-family:Arial, arial;}</style>
</head>
<body style="FONT-FAMILY: Arial; WORD-WRAP: break-word; FONT-SIZE: 10pt">
<p> Hello everyone!</p>
<p> </p>
<p>Trying to encode video using libav through gst-libav I faced following problem:</p>
<p> </p>
<p>SIGSEGV in av_opt_find2(gst-libs/ext/libav/libavuti;/opt.c) on line:<br />if(!strcmp(o->name, name) && (o->flags & opt_flags) == opt_flags &&</p>
<p> </p>
<p>Problem is: code tryes to access field name on object o of type AVOption when o is invalid.</p>
<p>After investigation I found that problem is cast of method param obj to type AVClass,</p>
<p>but av_opt_set_int passes &ffmpegmux->context there, which is of type AVFormatContext*.</p>
<p> </p>
<p>AVFormatContext struct contains field av_class of type AVClass*, so</p>
<p>change of code from:</p>
<p>av_opt_set_int(&ffmpegmux->context, "preload", ffmpegmux->preload, 0);</p>
<p>to </p>
<p>av_opt_set_int(&ffmpegmux->context->av_class, "preload", ffmpegmux->preload, 0);</p>
<p>fixes my problem.</p>
<p> </p>
<p>But question is: I'm not sure at this moment that my change is correct one in the sense of gstavmux logic and libav usage.</p>
<p> </p>
<p>If my change is correct, I would create issue in bugzilla and attach patch there.</p>
<p> </p><!--SP:dmitry.m-->
<p>WBR,</p>
<p>Dmitry Melnichenko</p><!--dmitry.m:EP-->
<p> </p>
<table id="confidentialsignimg">
<tbody>
<tr>
<td namo_lock="namo_lock">
<p><img border="0" alt="" src="cid:1CA8977932ED416E9D8527468A2126E80@samsung.net" width="520" /></p></td>
</tr>
</tbody>
</table>
</body>
</html><img src='http://ext.w1.samsung.net/mailcheck/SeenTimeChecker?do=3e4f407a6b00dcd0f5e01978836bf23e8c9e07760bcbd46a033cd743df334a6c27f9078a62f7f8599aba4bb3b2b5ca437ba1b0745ef9b1bd8228f4fb11dfa5b9ba7e558302beb322f3f842f026c9a736cf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>