Colossus (12021-08-16): > Hello Nicolas, > > thanks for replying. The documentation is not very clear. I already > looked at encode_video.c and it wasn't useful as it creates a dummy > image, I have to read data from a cairo surface instead.
The only difference it makes is what you put on the right hand side of the = sign; FFmpeg is on the left hand side of the = equal sign, a dummy image or an image from Cairo makes no difference from FFmpeg's perspective. > There should be more documentation on *HOW* to put the single puzzle > pieces *TOGETHER, *not just describing the *SINGLE* > pieces to my humble opinion. Please feel free to suggest enhancements once you have grasped how it works. > Also I'm not sure what you mean with: "Calling > av_frame_make_writable() on a frame you just allocated makes no > sense." as in encode_video.c at line 140 I see the call to > av_frame_allloc() and then at line 160, so after line 140 I read the > call to av_frame_make_writable()... And on line 155 you have the beginning of a loop. The av_frame_make_writable() on line 160 is useless on the first round of the loop, because the frame is freshly allocated and you can be sure it is writable. But on the second round of the loop, it comes after the first round, and in particular after encode() → avcodec_send_frame(); avcodec_send_frame() can keep a reference on the frame, and therefore make it unwritable. > I know where the flaw is as I used return codes not visible in the > code above. I clearly stated it in my message: You must check the return code of all the functions that can fail. If you do not, your code is obviously invalid. Start by fixing that before asking for more help. > Did you reply from the beach...? Ahem. > On Mon, 16 Aug 2021 at 10:20, Nicolas George > <[email protected]> wrote: Top-posting is forbidden on this mailing-list; do not do it again if you want more help. Look it up if you do not know what it means. -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
