On Mon, 28 Jul 2008 08:40:56 -0400, MtTracer <[EMAIL PROTECTED]> wrote: > Alexander Benz schrieb: >> Hi there, >> >> I'm trying to setup a partly multi threaded video pipeline but my result >> images come out distorted from time to time. >> It seems like some lines of the video contain lines from the previous >> frames ... but I can't find the exact cause. Maybe >> anyone has experienced a similar effect or knows the answer to this >> problem. >> >> In general, what I do is the following : >> >> Open the Mpeg2 video stream (av_open_input_file, avcodec_find_decoder, >> avcodec_open etc.) then >> >> 1. Read a frame from the stream (av_read_frame) >> > Do you call av_dup_packet for the read packets in this step? Packets may > become invalid > after the next call to av_read_frame if you don't duplicate their data.
Actually its worse than this. The AVFrame must also be duplicated, because some codecs re-use the pixel buffers. Basically you can only rely on having a single AVFrame decoded at a time. This is only an issue for some codecs, though. >> 2. Decode frame (avcodec_decode_video) >> 3. Do color conversion (YUV --> RGB) >> 4. Display Image >> >> [...] >> -- Michael Conrad IntelliTree Solutions llc. 513-552-6362 [EMAIL PROTECTED] _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
