On Wed, 10 Feb 2010 11:50:54 -0500, Gian Lorenzo Meocci <[email protected]> wrote:

When I starte my program (ctfull) I obtain this output:
[...]
[swscaler @ 0x9a579a0]No accelerated colorspace conversion found.
resizeVideo: width_out =  320  height_out =  240
[mp2 @ 0x99d15e0]incorrect frame size
    Last message repeated 3 times
[mp2 @ 0x99d15e0]incomplete frame
[Error] len1 =  -1
[mp2 @ 0x99d15e0]Header missing skipping one byte.
    Last message repeated 51 times
[mp2 @ 0x99d15e0]incorrect frame size
[mp2 @ 0x99d15e0]Header missing skipping one byte.
    Last message repeated 51 times

Errors like those often happen when you pass the wrong packet to the decoder. I.e. if you accidentally pass video packets to the audio decoder, or similar.

                if(pkt)
                {
                        av_free(pkt->data);
                        delete pkt;
                        pkt = 0;
                }

I don't know how you created the pkt object, but a common mistake when people first start using libav is to assume that the packets you get from the demuxer are dynamic "objects" which you own and can use as you please. The actual rule is that the packet is a temporary view of the data, and after av_read_frame, you must "av_free_packet" or "av_dup_packet" on that packet before calling av_read_frame the next time, because that packet might not be dynamic at all! It could point to a buffer inside the demuxer, and av_free_packet in that case does nothing (by design). If you call av_dup_packet, then you *do* have a dynamically allocated buffer and av_free_packet will actually free it.


--
Michael Conrad
IntelliTree Solutions llc.
513-552-6362
[email protected]
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to