0019-FFmpeg-omcdec-fix-mjpeg_omx-decoder-scale-option-bug.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. From bc391d931fa56ab788ae9cee7c249f91a9263d5b Mon Sep 17 00:00:00 2001
  2. From: "arvin.zhu" <arvin.zhu@starfivetech.com>
  3. Date: Wed, 2 Nov 2022 17:21:01 +0800
  4. Subject: [PATCH] FFmpeg:omcdec: fix mjpeg_omx decoder scale option bug
  5. fix mjpeg_omx decoder scale option bug
  6. Signed-off-by: arvin.zhu <arvin.zhu@starfivetech.com>
  7. ---
  8. libavcodec/omxdec.c | 6 +++---
  9. 1 file changed, 3 insertions(+), 3 deletions(-)
  10. diff --git a/libavcodec/omxdec.c b/libavcodec/omxdec.c
  11. index b4a7c96..019db2e 100755
  12. --- a/libavcodec/omxdec.c
  13. +++ b/libavcodec/omxdec.c
  14. @@ -602,11 +602,11 @@ static av_cold int omx_component_init(AVCodecContext *avctx, const char *role)
  15. ScaleConfig.xWidth = (1 << 16) >> (s->scale_width & 0x3);
  16. ScaleConfig.xHeight = (1 << 16) >> (s->scale_height & 0x3);
  17. OMX_SetConfig(s->handle, OMX_IndexConfigCommonScale, &ScaleConfig);
  18. - } else {
  19. - out_port_params.format.video.nFrameWidth = avctx->width;
  20. - out_port_params.format.video.nFrameHeight = avctx->height;
  21. }
  22. + out_port_params.format.video.nFrameWidth = avctx->width;
  23. + out_port_params.format.video.nFrameHeight = avctx->height;
  24. +
  25. /* Set pixel format to decoder output*/
  26. if (s->pixel_format) {
  27. switch (av_get_pix_fmt(s->pixel_format)) {
  28. --
  29. 2.17.1