[Libav-user] Problem in setting stream side data
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Jan 7 06:04:15 EET 2018
2018-01-07 4:59 GMT+01:00 Davood Falahati <falahati.davood at gmail.com>:
> Dear all,
>
> I am using ffmpeg transcoing example. In setting up the output file, I want
> to copy the DISPLAY_MATRIX side data attached to the video stream. This is
> what I do:
>
> AVStream *out_stream;
>
> AVStream *in_stream;
>
> static AVFormatContext *ifmt_ctx;
>
> static AVFormatContext *ofmt_ctx;
>
> .....
>
> .....
>
> .....
>
> out_stream = avformat_new_stream(ofmt_ctx, NULL);
>
> in_stream = ifmt_ctx->streams[i];
>
>
> uint8_t* resp = av_stream_get_side_data(in_stream ,
> AV_PKT_DATA_DISPLAYMATRIX, sd_size);
>
>
> if(resp!=NULL){
>
> av_stream_add_side_data(out_stream, AV_PKT_DATA_DISPLAYMATRIX, resp,
> *sd_size);
>
>
> }
>
> .....
>
> .....
>
> ......
>
> avformat_free_context(ofmt_ctx); //problem happens here
>
>
> everything goes well until I want to free ofmt_ctx. I receive the attached
> error.
Did you test with valgrind?
Carl Eugen
More information about the Libav-user
mailing list