[Libav-user] *** stack smashing detected *** AVPacket

יוסף אלון yos104104 at gmail.com
Tue Apr 4 18:20:15 EEST 2017


I Solved this by creating my own

void av_init_packet2(AVPacket *pkt)
{
    pkt->pts                  = AV_NOPTS_VALUE;
    pkt->dts                  = AV_NOPTS_VALUE;
    pkt->pos                  = -1;
    pkt->duration             = 0;
    pkt->flags                = 0;
    pkt->stream_index         = 0;
    pkt->buf                  = NULL;
    pkt->side_data            = NULL;
    pkt->side_data_elems      = 0;
}

Instead Of

void av_init_packet(AVPacket *pkt)
{
    pkt->pts                  = AV_NOPTS_VALUE;
    pkt->dts                  = AV_NOPTS_VALUE;
    pkt->pos                  = -1;
    pkt->duration             = 0;
#if FF_API_CONVERGENCE_DURATION
FF_DISABLE_DEPRECATION_WARNINGS
    pkt->convergence_duration = 0;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
    pkt->flags                = 0;
    pkt->stream_index         = 0;
    pkt->buf                  = NULL;
    pkt->side_data            = NULL;
    pkt->side_data_elems      = 0;
}

2017-04-04 18:09 GMT+03:00 יוסף אלון <yos104104 at gmail.com>:

> Not working:
> I tried:
> AVPacket avpkt;
>  avpkt.data = 0;
>  av_init_packet(&avpkt);
>
>  av_free_packet(&avpkt);
>
> and also tried:
> AVPacket avpkt;
>
>  av_init_packet(&avpkt);
>  avpkt.data = 0;
>  av_free_packet(&avpkt);
>
>
>
> 2017-04-04 18:00 GMT+03:00 Anton Shekhovtsov <shekh.anton at gmail.com>:
>
>>
>> 2017-04-04 17:56 GMT+03:00 יוסף אלון <yos104104 at gmail.com>:
>>
>>> When using the following:
>>> AVPacket avpkt;
>>>   av_init_packet(&avpkt);
>>> //av_new_packet(&avpkt, 1000);
>>>   av_free_packet(&avpkt);
>>>
>>> I get: *** stack smashing detected ***: "The project location"
>>> terminated
>>>
>>> How can i fix it?
>>>
>>>
>>>
>>> --
>>> Yosef Alon
>>>
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>
>>>
>> avpkt.data = 0
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>
>
> --
> בברכה, יוסף אלון
> 050-4916740
>


-- 
בברכה, יוסף אלון
050-4916740
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20170404/a19129b0/attachment.html>


More information about the Libav-user mailing list