On Thu, Jul 21, 2016 at 10:49 AM, Anton Khirnov <an...@khirnov.net> wrote:
> Quoting Vittorio Giovara (2016-07-20 21:26:26)
>> ---
>> More compact and typo-free.
>> Vittorio
>>
>>  libavcodec/avcodec.h | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index ace761d..72665ba 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -4985,6 +4985,9 @@ typedef struct AVBSFInternal AVBSFInternal;
>>   * The fields in the struct will only be changed (by the caller or by the
>>   * filter) as described in their documentation, and are to be considered
>>   * immutable otherwise.
>> + *
>> + * @note Input and output AVCodecParameters are allocated in av_bsf_alloc(),
>> + *       they need to be initialized via avcodec_parameters_copy().
>
> This is not correct:
> - you don't have to use specifically avcodec_parameters_copy(), the
>   parameters can also be set manually or through
>   avcodec_parameters_from_context() or through some other functions we
>   may add in the future

OK, but this is absolutely unclear: for example in my case I assigned
par_in to stream->codecpar, and the world crashed when i was either
freeing the format context or the bsf. I think it should be made very
clear not to do that.

> - only the input parameters are filled by the caller. The output
>   parameters are set by the filter, as is already documented.

So what should be done with them? copy back to stream after init?
-- 
Vittorio
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to