diff options
author | Kwanghoon Son <k.son@samsung.com> | 2023-03-22 14:01:59 +0900 |
---|---|---|
committer | Kwanghoon Son <k.son@samsung.com> | 2023-03-24 09:05:35 +0900 |
commit | 4ac464bef3dc8374be8ec456b7a01cdfbf2a93fb (patch) | |
tree | ae08e85611f9f1665a8e0633924e4ea5bb343f76 /mv_common | |
parent | b04be63a146320452a5c8161a5172e13c89bd011 (diff) | |
download | mediavision-4ac464bef3dc8374be8ec456b7a01cdfbf2a93fb.tar.gz mediavision-4ac464bef3dc8374be8ec456b7a01cdfbf2a93fb.tar.bz2 mediavision-4ac464bef3dc8374be8ec456b7a01cdfbf2a93fb.zip |
Fix format unref and media packet test
[Issue type] fix
[Version] 0.27.9
Change-Id: Ifa13a2d3745d554c795f5659bc58a30c695917bf
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
Diffstat (limited to 'mv_common')
-rw-r--r-- | mv_common/src/mv_common_c.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mv_common/src/mv_common_c.cpp b/mv_common/src/mv_common_c.cpp index 67ac10e9..ef359a07 100644 --- a/mv_common/src/mv_common_c.cpp +++ b/mv_common/src/mv_common_c.cpp @@ -109,9 +109,17 @@ int mv_source_fill_by_media_packet_c(mv_source_h source, media_packet_h media_pa ret = media_format_get_video_info(format, &mimetype, &image_width, &image_height, NULL, NULL); if (ret != MEDIA_PACKET_ERROR_NONE) { + if (media_format_unref(format) != MEDIA_PACKET_ERROR_NONE) + LOGE("media_format_unref() failed, mv_source_h fill skipped"); + LOGE("media_format_get_video_info() failed, mv_source_h fill skipped"); return MEDIA_VISION_ERROR_INVALID_PARAMETER; } + ret = media_format_unref(format); + if (ret != MEDIA_PACKET_ERROR_NONE) { + LOGE("media_format_unref() failed, mv_source_h fill skipped"); + return MEDIA_VISION_ERROR_INVALID_PARAMETER; + } if (mimetype > MEDIA_FORMAT_H261 && mimetype <= MEDIA_FORMAT_MPEG4_ASP) { LOGE("Media format mimetype is not the raw video, mv_source_h fill skipped"); |