[Ffmpeg-cvslog] r8587 - in trunk: Changelog doc/ffmpeg-doc.texi libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/mjpeg.c libavformat/Makefile libavformat/allformats.c libavformat/allformats.h libavformat/thp.c

Alex Beregszaszi alex
Sun Apr 1 16:44:32 CEST 2007


Hi,

> +    url_fseek(pb, thp->next_frame, SEEK_SET);
> +
> +    /* Locate the next frame and read out its size.  */
> +    thp->next_frame += thp->next_framesz;
> +    thp->next_framesz = get_be32(pb);
> +
> +                        get_be32(pb); /* Previous total size.  */
> +    size              = get_be32(pb); /* Total size of this frame.  */
> +
> +    if (thp->has_audio)
> +                        get_be32(pb); /* Audio size.  */

No need to skip audio here? Or totalsize includes the audio size too? In
this case you pass even unneeded data to the JPEG decoder.

> +
> +    ret = av_get_packet(pb, pkt, size);
> +    if (ret != size) {
> +       av_free_packet(pkt);
> +       return AVERROR_IO;
> +    }
> +
> +    pkt->stream_index = thp->video_stream_index;
> +    thp->frame++;
> +
> +    return 0;
> +}

--
Alex Beregszaszi






More information about the ffmpeg-cvslog mailing list