What error do you see?

corey

On Thu, Jan 11, 2018 at 2:02 PM, Davood Falahati <[email protected]>
wrote:

> Dear all,
>
> I read this description in avformat.h
>
> /**
>
>  * Wrap an existing array as stream side data.
>
>  *
>
>  * @param st stream
>
>  * @param type side information type
>
>  * @param data the side data array. It must be allocated with the av_malloc()
>
>  *             family of functions. The ownership of the data is transferred 
> to
>
>  *             st.
>
>  * @param size side information size
>
>  * @return zero on success, a negative AVERROR code on failure. On failure,
>
>  *         the stream is unchanged and the data remains owned by the caller.
>
>  */
>
> int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
>
>                             uint8_t *data, size_t size);
>
>
> I have two AVStream variables, say in_stream and out_stream.
>
> I want to copy in_stream side data to out_stream. As suggested in
>
> the comments, out_stream->side_data should be allocated with av_malloc() 
> family of functions.
>
> I want to know how should I allocate *out_stream->side_data->data* ?
>
> When I try
>
> out_stream->side_data->data = (uint8_t*) 
> av_mallocz(in_stream->side_data->size*sizeof(uint8_t*));
>
>
> it leads to an unexpected error. Can anyone suggest how should I allocate 
> this?
>
>
> Regards,
>
> Davood Falahati
>
>
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to