Because in while() you're changing pkt.data field and av_free() in 
av_free_packet() will free invalid pointer after you complete loop. It may 
cause crashing or memory leak. 
24.03.2013, в 19:00, Pauli Suuraho написал(а):

> Works perfectly! Thank you both for your help.
> 
> One last question to make sure I understood everything..
> 
> >pkt.data = orig_ptr;
> >pkt.size = orig_size;
> 
> Why do you set the data back before you free the packet? I tried without it 
> and it seemed to work. Is it needed?
> 
> -Pauli
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to