[Libav-user] Is it possible that same decoding code generate different result on different machines

Alex Cohn alexcohn at netvision.net.il
Wed Oct 23 17:59:56 CEST 2013

On Oct 23, 2013 4:43 AM, "YIRAN LI" <mrfun.china at gmail.com> wrote:
> Hi guys,
> I'm testing a small piece of code which just read packet
using av_read_frame and send packet to
> avcodec_decode_video2 to get a decoded frame.
> What surprised me was, when running this same program on different
machines, avcodec_decode_video2 (AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr, const AVPacket *avpkt) return first true value at
different packets.
> On both machines, I can read packets with packet.pts with 0, 200, 400,
600, 800, 1000.
> But on one machine, packet with 600 dts can get the first decoded frame,
and on another one,
> the first frame is decoded until packet with 1000 dts is passed into
> Since same binary and libs are running on 2 machines, so I assume that I
should get same result.
> But seems that's not true. Has anyone else met a similar problem?
> Thanks

One possible difference could be due to automatic multithreading. You could
try to configure the codec to use single CPU or disable threading during
build, to prove this is the case.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131023/c3e8f4b5/attachment.html>

More information about the Libav-user mailing list