diff options
author | wangbin <wbsecg1@gmail.com> | 2025-06-23 11:48:38 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2025-07-18 10:37:53 +0800 |
commit | 7b13d17b6d88190c49e887134bba6a43d716d50a (patch) | |
tree | 3f45554c880efb9d51bd9c7e1322ac1e47867d22 /libavdevice/android_camera.c | |
parent | 291ec0faf3b1394335ad26bc761512c601fbc99e (diff) | |
download | ffmpeg-7b13d17b6d88190c49e887134bba6a43d716d50a.tar.gz |
avdevice/android_camera: Set image linesize aligment to 1
Can't read alignment from packet, codecpar or decoded frame linesizes, so don't
set it. My test device redmi k60 produces images in 4624x3472, not 32 aligned
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavdevice/android_camera.c')
-rw-r--r-- | libavdevice/android_camera.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/android_camera.c b/libavdevice/android_camera.c index 5de44e6d86..8433286296 100644 --- a/libavdevice/android_camera.c +++ b/libavdevice/android_camera.c @@ -421,7 +421,7 @@ static void image_available(void *context, AImageReader *reader) } } - pkt_buffer_size = av_image_get_buffer_size(ctx->image_format, ctx->width, ctx->height, 32); + pkt_buffer_size = av_image_get_buffer_size(ctx->image_format, ctx->width, ctx->height, 1); AImage_getTimestamp(image, &image_timestamp); AImage_getPlaneRowStride(image, 0, &image_linestrides[0]); @@ -460,7 +460,7 @@ static void image_available(void *context, AImageReader *reader) av_image_copy_to_buffer(pkt.data, pkt_buffer_size, (const uint8_t * const *) image_plane_data, image_linestrides, ctx->image_format, - ctx->width, ctx->height, 32); + ctx->width, ctx->height, 1); ret = av_thread_message_queue_send(ctx->input_queue, &pkt, AV_THREAD_MESSAGE_NONBLOCK); |