[Libav-user] Problem in setting stream side data

Davood Falahati falahati.davood at gmail.com
Sun Jan 7 05:59:56 EET 2018


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.

Can you help me what is the problem and how should I resolve it?



Best,

Davood Falahati
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180107/4508d2fe/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backtrace.log
Type: text/x-log
Size: 66790 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180107/4508d2fe/attachment.bin>


More information about the Libav-user mailing list