[Libav-user] Problem in setting stream side data

Davood Falahati falahati.davood at gmail.com
Fri Jan 19 23:12:00 EET 2018


Dear Carl,

> Possibly unneeded cast and you should check all
> allocations for success.This one works in C

       if(in_stream->side_data!=NULL){

               int *sd_size=malloc(sizeof(int*));

              uint8_t* sd = av_stream_get_side_data(in_stream ,
AV_PKT_DATA_DISPLAYMATRIX, sd_size);

                if(sd!=NULL){

                     in_stream->side_data->data =  av_mallocz(

                                in_stream->side_data->size*sizeof(uint8_t*));

                  av_stream_add_side_data(out_stream,
AV_PKT_DATA_DISPLAYMATRIX, resp, *sd_size);

                }

          }


Is there anything wrong with it?


Davood Falahati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180120/66357c98/attachment.html>


More information about the Libav-user mailing list