Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (85)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (13689)

  • avfilter/vf_xpsnr : Fix leaks

    9 janvier, par Andreas Rheinhardt
    avfilter/vf_xpsnr : Fix leaks
    

    This filter uses the AVBuffer API to allocate buffers that are never
    shared at all and frees them via av_freep() (actually, it passes
    pointers to AVBufferRefs to av_freep, so that only the AVBuffer
    structures are freed at all (because AVBufferRef has a AVBuffer* as its
    first member), not the AVBufferRef and not the underlying buffers ;
    and due to a wrong check the AVBuffers corresponding
    to buf_org[c] with c>0 were never freed at all). This is a violation
    of the AVBuffer API and causes a memleak. Fix this by avoiding the
    AVBuffer API altogether.
    (The FATE tests don't catch this, because they use piping to awk,
    so that the error code from ffmpeg is ignored.)

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavfilter/vf_xpsnr.c
  • avcodec/librsvgdec : fix memory leaks and deprecated functions

    8 octobre 2023, par Leo Izen
    avcodec/librsvgdec : fix memory leaks and deprecated functions
    

    At various points through the function librsvg_decode_frame, errors are
    returned from immediately without deallocating any allocated structs.
    This patch both fixes those leaks, and also fixes the use of functions
    that are deprecated since librsvg version 2.52.0. The older calls are
    still used, guarded by #ifdefs while the newer replacements are used if
    librsvg >= 2.52.0. One of the deprecated functions is used as a check
    for the configure shell script, so it was replaced with a different
    function.

    Signed-off-by : Leo Izen <leo.izen@gmail.com>

    • [DH] configure
    • [DH] libavcodec/librsvgdec.c
  • Android Java Jni c++ Memory leaks

    6 avril 2023, par Edson Magombe

    I'm facing problems with my code. It has a pretty high memory consumption and with time can hit 1GB RAM.&#xA;I'm using c++ and ffmpeg lib to read audio samples and generate waveforms but I really can't find where the leak is.

    &#xA;

    Here is my code :

    &#xA;

    extern "C"&#xA;JNIEXPORT jint JNICALL&#xA;Java_modules_Waveform_decode_1to_1pcm(JNIEnv *env, jobject thiz, jstring input, jstring output) {&#xA;    const char * filename = (*env).GetStringUTFChars(input, 0);&#xA;    const char * outfilename = (*env).GetStringUTFChars(output, 0);&#xA;        if((*env).PushLocalFrame(1) != JNI_OK) {&#xA;            __android_log_print(ANDROID_LOG_ERROR, "exception: ", "%s", "Failed to open capacity");&#xA;            return -1;&#xA;        }&#xA;        /* Open File */&#xA;        AVFormatContext * format_ctx{nullptr};&#xA;        int result_open = avformat_open_input(&amp;format_ctx, filename, nullptr, nullptr);&#xA;&#xA;        result_open = avformat_find_stream_info(format_ctx, nullptr);&#xA;&#xA;        int index = av_find_best_stream(format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, nullptr, 0);&#xA;&#xA;        /* Finding decoder */&#xA;        AVStream *streams = format_ctx->streams[index];&#xA;        const AVCodec *decoder = avcodec_find_decoder(streams->codecpar->codec_id);&#xA;&#xA;        AVCodecContext *codec_ctx{avcodec_alloc_context3(decoder)};&#xA;&#xA;        avcodec_parameters_to_context(codec_ctx, streams->codecpar);&#xA;&#xA;        /* Opening decoder */&#xA;        result_open = avcodec_open2(codec_ctx, decoder, nullptr);&#xA;&#xA;        /* Decoding the audio */&#xA;        AVPacket *packet = av_packet_alloc();&#xA;        AVFrame *frame = av_frame_alloc();&#xA;&#xA;        SwrContext *resampler{swr_alloc_set_opts(&#xA;                nullptr,&#xA;                streams->codecpar->channel_layout,&#xA;                AV_SAMPLE_FMT_FLT,&#xA;                streams->codecpar->sample_rate,&#xA;                streams->codecpar->channel_layout,&#xA;                (AVSampleFormat) streams->codecpar->format,&#xA;                streams->codecpar->format,&#xA;                streams->codecpar->sample_rate,&#xA;                0&#xA;        )};&#xA;&#xA;        std::ofstream out(outfilename, std::ios::binary);&#xA;        while (av_read_frame(format_ctx, packet) == 0) {&#xA;            if(packet->stream_index != streams->index) {&#xA;                continue;&#xA;            }&#xA;&#xA;            result_open = avcodec_send_packet(codec_ctx, packet);&#xA;            if(result_open &lt; 0) {&#xA;                // AVERROR(EAGAIN) --> Send the packet again getting frames out!&#xA;                if(result_open != AVERROR(EAGAIN)) {&#xA;                    __android_log_print(ANDROID_LOG_ERROR, "exception: ", "%s", "Error decoding...");&#xA;                }&#xA;            }&#xA;            while (avcodec_receive_frame(codec_ctx, frame) == 0) {&#xA;                /* Resample the frame */&#xA;                AVFrame *resampler_frame = av_frame_alloc();&#xA;                resampler_frame->sample_rate = 100;&#xA;                resampler_frame->channel_layout = frame->channel_layout;&#xA;                resampler_frame->channels = frame->channels;&#xA;                resampler_frame->format = AV_SAMPLE_FMT_S16;&#xA;&#xA;                result_open = swr_convert_frame(resampler, resampler_frame, frame);&#xA;                if(result_open >= 0) {&#xA;                    int16_t *samples = (int16_t *) frame->data[0];&#xA;                    for(int c = 0; c &lt; resampler_frame->channels; c &#x2B;&#x2B;) {&#xA;                        float sum = 0;&#xA;                        for(int i = 0; i &lt; resampler_frame->nb_samples; i &#x2B;&#x2B;) {&#xA;                            if(samples[i * resampler_frame->channels &#x2B; c] &lt; 0) {&#xA;                                sum &#x2B;= (float) samples[i * resampler_frame->channels &#x2B; c] * (-1);&#xA;                            } else {&#xA;                                sum &#x2B;= (float) samples[i * resampler_frame->channels &#x2B; c];&#xA;                            }&#xA;                            int average_point = (int) ((sum * 2) / (float) resampler_frame->nb_samples);&#xA;                            if(average_point > 0) {&#xA;                                out &lt;&lt; average_point &lt;&lt; "\n";&#xA;                            }&#xA;                        }&#xA;                    }&#xA;                }&#xA;                av_frame_unref(frame);&#xA;                av_frame_free(&amp;resampler_frame);&#xA;            }&#xA;        }&#xA;        av_frame_free(&amp;frame);&#xA;        av_packet_unref(packet);&#xA;        av_packet_free(&amp;packet);&#xA;        out.close();&#xA;        (*env).PopLocalFrame(nullptr);&#xA;        (*env).ReleaseStringUTFChars(input, filename);&#xA;        (*env).ReleaseStringUTFChars(output, outfilename);&#xA;    return 1;&#xA;}&#xA;

    &#xA;

    I tried ticks like (*env).ReleaseStringUTFChars and (*env).PopLocalFrame(nullptr) but it's not working. The memory consumption is still very high

    &#xA;