On Sat, 2020-03-14 at 12:04 +0100, Carl Eugen Hoyos wrote:
> Am Fr., 13. März 2020 um 14:04 Uhr schrieb Slav <[email protected]>:
> > Hello. I am trying to implement program which reads out plain
> > images
> > (ready for some further usage) from video files, but got issues
> > with
> > sws_scale() complaining about wrong AVFrame format:
> > "[swscaler @ 0x558ef00721a0] bad src image pointers".
> 
> Did you look at doc/examples/scaling_video.c ?
> 
> Carl Eugen
> _______________________________________________
> 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".

Thank you for your answer. Was told on stackoverflow.com to properly
allocate frame this way:

AVFrame* frame = av_frame_alloc();
frame->format = whatever;
frame->width = w;
frame->height = h;
av_frame_get_buffer(frame, 32);

and also then discovered that I needed to read resulting (converted)
pixels from sws_scale() output as frame->data[0] instead of frame-
>data. Updated repo https://github.com/SlavMFM/libav_bmp_example if
somebody googles this post. Cheers ^^

_______________________________________________
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".

Reply via email to