Skip to content

Commit caf3d2d

Browse files
committed
Merge branch 'bugfix/fix_fourcc_to_string_macro' into 'main'
fix(gmf_core): Fix fourcc to string macro error See merge request adf/multimedia/esp-gmf!172
2 parents 36a823d + 22a58a9 commit caf3d2d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

gmf_core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.7.4
4+
5+
### Bug Fixes
6+
7+
- Fixed incorrect bit shift in the macro converting FourCC code to a string
8+
39
## v0.7.3
410

511
### Bug Fixes

gmf_core/helpers/include/esp_fourcc.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99

1010
#include <stdint.h>
1111

12-
#define ESP_FOURCC_VERSION ("v1.0.0")
12+
#define ESP_FOURCC_VERSION ("v1.0.1")
1313

1414
/**
1515
# Changelog
1616
17+
## [v1.0.1]
18+
- Fixed incorrect bit shift in the macro converting FourCC code to a string
19+
1720
## [v1.0.0]
1821
- Add audio, video and pixel format with fourcc(four character code)
1922
*/
@@ -25,7 +28,7 @@ typedef uint32_t esp_fourcc_t; // 32-bit FOURCC code
2528
// Convert 32-bit FOURCC to string
2629
static inline void gmf_fourcc_to_str(uint32_t fourcc, char out[5]) {
2730
for (int i = 0; i < 4; i++) {
28-
out[i] = (char)((fourcc >> (i * 4)) & 0xFF);
31+
out[i] = (char)((fourcc >> (i * 8)) & 0xFF);
2932
}
3033
out[4] = '\0';
3134
}

gmf_core/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.7.3"
1+
version: "0.7.4"
22
description: Espressif General Multimedia Framework (gmf-core) module
33
url: https://github.com/espressif/esp-gmf/tree/main/gmf_core
44
documentation: "https://github.com/espressif/esp-gmf/blob/main/gmf_core/README.md"

0 commit comments

Comments
 (0)