Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9284)

  • avformat/segment : Fix leak and invalid free of AVIOContext

    6 septembre 2020, par Andreas Rheinhardt
    avformat/segment : Fix leak and invalid free of AVIOContext
    

    seg_init() and seg_write_header() currently contain a few error paths
    in which an already opened AVIOContext for the child muxer leaks (namely
    if there are unrecognized options for the child muxer or if writing the
    header of the child muxer fails) ; the reason for this is that this
    AVIOContext is not closed in the deinit function. If all goes well, it
    is closed when writing the trailer. From this it also follows that the
    AVIOContext also leaks when the trailer is never written, even when
    writing the header succeeds.

    But simply freeing said AVIOContext in the deinit function is
    complicated by the fact that the AVIOContext may or may not have been
    opened via the io_open callback : If options are set to discard header
    and trailer, said AVIOContext can also be a null context which must not
    be closed via the io_close callback. This may lead to crashes, as
    io_close may presume the AVIOContext's opaque to be set. It currently
    works with the default io_close callback which simply calls avio_close(),
    because avio_close() doesn't care about opaque being NULL since commit
    6e8e8431e15a58aa44cfdd8c11f9ea096837c0fa. Therefore this commit records
    which of the two kinds of AVIOContext is currently in use to use the
    right way to close it.

    Finally there was one instance (namely if initializing the child muxer
    fails with no unrecognized options) where the AVIOContext was always
    closed via the io_close callback. The above remark applies to this ; it
    has been fixed, too.

    Reviewed-by : Ridley Combs <rcombs@rcombs.me>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/segment.c
  • avformat/segment : Free SegmentListEntries in deinit, not write_trailer

    5 septembre 2020, par Andreas Rheinhardt
    avformat/segment : Free SegmentListEntries in deinit, not write_trailer
    

    This fixes leaks when the trailer is never written.

    Reviewed-by : Ridley Combs <rcombs@rcombs.me>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/segment.c
  • Memory leak using FFmpeg

    3 août 2020, par kichma

    I found out that my application has a memory leak coming from a C++ function. It seems this function is called for each frame and it leak is proportional to the size of a frame. It's called from a python code but the leak is somewhere in the C++ code.
    &#xA;I don't have much experience with ffmpeg or C++ and I'm not author of this code. Does anyone see what is causing leak here or can provide some advice how to debug this ? I tried to use the code (windows part) from this answer https://stackoverflow.com/a/64166/10046424 to find which part of the code uses memory but I always got 0.

    &#xA;

     static py::object video_encode_frame(py::object self)   &#xA;{&#xA;&#xA;    video_encode_helper *vec = py::cppobject &lt; video_encode_helper > (self.attr("_encoder_state")).value();&#xA;&#xA;    int image_id = 0;&#xA;    RTIConfig rti;&#xA;    ViewerBase *bs = base(self);&#xA;    Py_BEGIN_ALLOW_THREADS;&#xA;    renderToExistingImage(&amp;rti, vec->img_key, image_id, bs, vec->c->width, vec->c->height);&#xA;    Py_END_ALLOW_THREADS;&#xA;&#xA;    static int i = 0;&#xA;    float dummy;&#xA;    int h, w;&#xA;    char buf[MVO_BUFFER_SIZE];&#xA;&#xA;    HC_Show_Image(vec->img_key, &amp;dummy, &amp;dummy, &amp;dummy, buf, &amp;w, &amp;h, vec->data);&#xA;    struct SwsContext *sws_ctx = sws_getContext(vec->c->width, vec->c->height, PIX_FMT_RGB24,&#xA;                                                vec->c->width, vec->c->height, (PixelFormat) vec->picture->format,  &#xA;                                                SWS_FAST_BILINEAR, NULL, NULL, NULL);&#xA;&#xA;    int src_linesize[] = { vec->c->width * 3, 0, 0, 0 };&#xA;    const uint8_t *src_data[] = { (const uint8_t *) vec->data, 0, 0, 0 };&#xA;    sws_scale(sws_ctx, (const uint8_t * const *) src_data, src_linesize, 0, vec->c->height, vec->picture->data,&#xA;              vec->picture->linesize);&#xA;    sws_freeContext(sws_ctx);&#xA;&#xA;    int repeat = vec->FPS / vec->TPS;&#xA;    if (repeat == 0)&#xA;        repeat = 1;&#xA;&#xA;&#xA;    int ret = -1;&#xA;&#xA;    AVPacket pkt = { 0 };&#xA;    int got_packet;&#xA;    av_init_packet(&amp;pkt);&#xA;&#xA;    /* encode the image */&#xA;    ret = avcodec_encode_video2(vec->c, &amp;pkt, vec->picture, &amp;got_packet);&#xA;    if (ret &lt; 0) &#xA;        return py::bool_(false);&#xA;&#xA;    for (int r = 0; r &lt; repeat; r&#x2B;&#x2B;) {&#xA;        /* If size is zero, it means the image was buffered. */&#xA;        if (!ret &amp;&amp; got_packet &amp;&amp; pkt.size) {&#xA;            pkt.stream_index = vec->video_st->index;&#xA;&#xA;            /* Write the compressed frame to the media file. */&#xA;            ret = av_interleaved_write_frame(vec->oc, &amp;pkt);&#xA;&#xA;        } else&#xA;            ret = 0;&#xA;&#xA;        vec->picture->pts &#x2B;= av_rescale_q(1, vec->video_st->codec->time_base, vec->video_st->time_base);&#xA;        vec->frame_count&#x2B;&#x2B;;&#xA;        }&#xA;    return py::bool_(true);&#xA;}&#xA;

    &#xA;

    There is also a cleanup function that is called at the end. Perhaps something should be deallocated there ?

    &#xA;

    static py::object video_encode_finalize(py::object self)&#xA;{&#xA;    if (self.attr("_encoder_state") == py::none())&#xA;        return py::bool_(false);&#xA;&#xA;    video_encode_helper *vec = py::cppobject &lt; video_encode_helper > (self.attr("_encoder_state")).value();&#xA;&#xA;    /* Write the trailer, if any. The trailer must be written before you&#xA;     * close the CodecContexts open when you wrote the header; otherwise&#xA;     * av_write_trailer() may try to use memory that was freed on&#xA;     * av_codec_close(). */&#xA;    av_write_trailer(vec->oc);&#xA;    /* Close each codec. */&#xA;&#xA;    avcodec_close(vec->video_st->codec);&#xA;    av_freep(&amp;(vec->picture->data[0]));&#xA;    av_free(vec->picture);&#xA;&#xA;    if (!(vec->fmt->flags &amp; AVFMT_NOFILE))&#xA;        /* Close the output file. */&#xA;        avio_close(vec->oc->pb);&#xA;&#xA;    /* free the stream */&#xA;    avformat_free_context(vec->oc);&#xA;&#xA;    vec->initialized = false;&#xA;    vec->frame_count = 0;&#xA;&#xA;    return py::bool_(true);&#xA;}&#xA;

    &#xA;