Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (108)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

Sur d’autres sites (10107)

  • avcodec/avpacket : deprecate av_copy_packet_side_data()

    25 septembre 2017, par James Almer
    avcodec/avpacket : deprecate av_copy_packet_side_data()
    

    It leaks memory and destroys the dst packet in case of failure, and it
    ultimately duplicates functionality already existing in the saner
    av_packet_copy_props().

    Reviewed-by : wm4
    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/avcodec.h
  • avformat/hlsenc : use AV_OPT_TYPE_DICT for hls_ts_options

    22 décembre 2019, par Marton Balint
    avformat/hlsenc : use AV_OPT_TYPE_DICT for hls_ts_options
    

    Simplifies code and avoids memory leaks.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavformat/hlsenc.c
  • FFmpeg, access violation on av_frame_free when running though Unity

    1er février 2021, par Mockarutan

    I'm working on a video recording plugin for Unity using ffmpeg. I'm new to the video encoding domain and just got my code to work today. But I think a might have a few memory leaks and trying to fix them crashes Unity.

    &#xA;&#xA;

    The plugin is written i c++ (as external "C" code) and imported in a c# script in unity with a simple DllImport. Again, this is not my comfort area either, but it works.

    &#xA;&#xA;

    When a screen buffer is rendered, I put in a RGB24 buffer and send it to my c++ function, this one :

    &#xA;&#xA;

    int encode_frame(uint8_t* rgb24Data)&#xA;{&#xA;    AVFrame *frame = av_frame_alloc();&#xA;    if (!frame)&#xA;        return COULD_NOT_ALLOCATE_FRAME;&#xA;&#xA;    frame->format = codec_context->pix_fmt;&#xA;    frame->width = codec_context->width;&#xA;    frame->height = codec_context->height;&#xA;&#xA;    int ret = av_image_alloc(frame->data, frame->linesize, codec_context->width, codec_context->height, codec_context->pix_fmt, 32);&#xA;    if (ret &lt; 0)&#xA;        return COULD_NOT_ALLOCATE_PIC_BUF;&#xA;&#xA;    SwsContext * ctx = sws_getContext(codec_context->width, codec_context->height,&#xA;        AV_PIX_FMT_RGB24, codec_context->width, codec_context->height,&#xA;        AV_PIX_FMT_YUV420P, 0, 0, 0, 0);&#xA;&#xA;&#xA;    uint8_t * inData[1] = { rgb24Data };&#xA;    int inLinesize[1] = { 3 * codec_context->width };&#xA;&#xA;    sws_scale(ctx, inData, inLinesize, 0, codec_context->height, frame->data, frame->linesize); // From RGB to YUV&#xA;&#xA;    frame->pts = frame_counter&#x2B;&#x2B;;&#xA;&#xA;    ret = avcodec_send_frame(codec_context, frame);&#xA;    if (ret &lt; 0)&#xA;        return ERROR_ENCODING_FRAME_SEND;&#xA;&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.data = NULL;&#xA;    pkt.size = 0;&#xA;&#xA;    while (true)&#xA;    {&#xA;        ret = avcodec_receive_packet(codec_context, &amp;pkt);&#xA;        if (!ret)&#xA;        {&#xA;            if (pkt.pts != AV_NOPTS_VALUE)&#xA;                pkt.pts = av_rescale_q(pkt.pts, codec_context->time_base, video_st->time_base);&#xA;            if (pkt.dts != AV_NOPTS_VALUE)&#xA;                pkt.dts = av_rescale_q(pkt.dts, codec_context->time_base, video_st->time_base);&#xA;&#xA;            av_write_frame(outctx, &amp;pkt);&#xA;            av_packet_unref(&amp;pkt);&#xA;        }&#xA;        else if (ret == AVERROR(EAGAIN))&#xA;        {&#xA;            frame->pts = frame_counter&#x2B;&#x2B;;&#xA;            ret = avcodec_send_frame(codec_context, frame);&#xA;            if (ret &lt; 0)&#xA;                return ERROR_ENCODING_FRAME_SEND;&#xA;        }&#xA;        else if (ret &lt; 0)&#xA;            return ERROR_ENCODING_FRAME_RECEIVE;&#xA;        else&#xA;            break;&#xA;    }&#xA;&#xA;    // This one&#xA;    av_frame_free(&amp;frame);&#xA;}&#xA;

    &#xA;&#xA;

    Now, this code might have a lot of issues that I'm not aware of, and you are free to point them out if you like. But the line that gives me error is av_frame_free(&amp;frame);.

    &#xA;&#xA;

    If I run this in a synthetic test app in c++ that I made, it works. I can even run it in a c# synthetic test app (exactly like the c++ one), and it works. But if I run it though Unity, it crashes on the first frame. The log says "Read from location fe7f8097 caused an access violation.".

    &#xA;&#xA;

    I have tried with av_freep() and av_free(). Not sure exactly what makes them different (different example codes use different ones), but none work.

    &#xA;&#xA;

    So, what I'm I missing ? The frame is leaking if I don't free it right ? But why does it crash in Unity ?

    &#xA;&#xA;

    The whole thing works great in Unity if I don't have the av_frame_free(&amp;frame);. Resulting video looks great !

    &#xA;&#xA;

    PS. I'm aware (as far as I know) that the frame also leaks if something fails and returns an error code. But one thing at a time.

    &#xA;