<div dir="ltr"><div>I think you need one because even if you are not encoding anything when creating the stream, the decoder still needs to know about the details of the audio encoding.<br><br></div>If the output format requires these details in the header then you need to tell the encoder to put its details in the header also.<br><div><div><div class="gmail_extra"><br></div><div class="gmail_extra">Salsaman.<br><br clear="all"></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br><a href="http://lives-video.com" target="_blank">http://lives-video.com</a><br><a href="https://www.openhub.net/accounts/salsaman" target="_blank">https://www.openhub.net/accounts/salsaman</a><br></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Mar 14, 2018 at 5:31 PM, Michael IV <span dir="ltr"><<a href="mailto:explomaster@gmail.com" target="_blank">explomaster@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Anton. I see what you mean, but I actually use that internal context,and it works perfectly.<div>For video I am getting h264 NALs from somewhere,so I don't perform encoding at all.</div><div>For audio, I am opening existing audio files/ streams with data in the format I need,so I don't</div><div>transcode,but just pass the data as is into the muxer.<br><div>So as you see I don't really need codec context for encoding.</div><div>But if the API forces me to create one just for the sake of aligning with some rules,I am not sure</div><div>that's a good thing.</div></div></div><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Wed, Mar 14, 2018 at 10:26 PM Anton Shekhovtsov <<a href="mailto:shekh.anton@gmail.com" target="_blank">shekh.anton@gmail.com</a>> wrote:<br></div></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr"><div class="gmail_extra">Yes you have to create with avcodec_alloc_context3.</div><div class="gmail_extra">The fact that structure of same type is present in input stream description does not mean you are supposed to use it. Don't remember where I learned it, maybe earlier on this list.</div></div></span><span class="">
______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
</span></blockquote></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div></div></div></div>