[Libav-user] AVStream->codec deprecation
Brian Brice
bbrice at gmail.com
Mon Aug 22 07:35:19 EEST 2016
I ran across the problem recently. When using the API with Visual
Studio, it'll actually give you errors for using deprecated functions
or struct members. Of course you can disable those errors, but then
they'll be warnings, etc, etc, etc.
On Sun, Aug 21, 2016 at 11:03 PM, salsaman <salsaman at gmail.com> wrote:
>
>
> On Sun, Aug 21, 2016 at 10:44 PM, Perette Barella <perette at barella.org>
> wrote:
>>
>> On 2016年08月21日, at 21:31, salsaman <salsaman at gmail.com> wrote:
>>
>>
>> Here we go, I can answer definitively now:
>>
>> https://ffmpeg.org/doxygen/3.1/ffplay_8c_source.html
>>
>>
>> AVCodecContext *avctx;
>>
>> avctx = avcodec_alloc_context3(NULL);
>> if (!avctx)
>> return AVERROR(ENOMEM);
>>
>> ret = avcodec_parameters_to_context(avctx,
>> ic->streams[stream_index]->codecpar);
>> if (ret < 0)
>> goto fail;
>>
>>
>> You are explaining what replaces codec parameter setting, which I have
>> already familiarized myself with. This does not answer the question I
>> originally asked, which is how I am to call avcodec_close (and other
>> functions) which require an AVCodecContext, when that field is deprecated.
>> Using avformat_new_stream’s docucomments specify these calls are necessary
>> to clean up when done with the stream.
>>
>> Perette
>>
>
>
> Just use avctx from the code above. I don' t see what the problem is.
>
>
> Gabriel.
>
>
>
>
>
>
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
--
Brian Brice
http://heapify.org/
More information about the Libav-user
mailing list