On Tue, Jun 26, 2012 at 12:34 PM, Simon Daniels
<[email protected]> wrote:
> // Is this a packet from the video stream?
> if (packet.stream_index == videoStreamIndex && frameLocation++ % frameSkip
> == 0)
> {
> // Decode video frame
> avcodec_decode_video2(pCodecCtx, pFrameYUV, &isFrameFinished, &packet);

You don't want to be doing it like this, I don't think. If there are B
frames in the video, this could really mess things up (because frame 2
could depend on decoding frame 1 just before it, but you skipped
decoding frame 1, so now frame 2 is junk/gets decoded wrong (and now
all the ones decoded after it will be junk frames too until you hit a
keyframe)).
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to