Currently, I got the rotation info by:
av_dict_get(videoStream->metadata, "rotate", NULL, AV_DICT_MATCH_CASE);
Now, how can I apply this rotation value while I decoding the video?
I decode the frame with: avcodec_send_packet()
and avcodec_receive_frame()
, then covert the pixel format and scale the frame with sws_scale()
.
You must use a filter graph and a transpose or hflip filter. Swscale won't do it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.