summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2023-02-15 19:02:35 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2023-02-22 11:24:57 +0000
commitcbc7374c959d7e76f24631fbb6afeda44ed21b17 (patch)
tree9c5f8ee1f3cbd545882a7fde9b813fb7a212d237
parentcbbfab0f3bd809d1b708789e74f17d6d4c0e7905 (diff)
downloadgstreamer-cbc7374c959d7e76f24631fbb6afeda44ed21b17.tar.gz
jpegparse: Parse AVI1 tag in app0.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3943>
-rw-r--r--subprojects/gst-plugins-bad/gst/jpegformat/gstjpegparse.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-bad/gst/jpegformat/gstjpegparse.c b/subprojects/gst-plugins-bad/gst/jpegformat/gstjpegparse.c
index 81c31d77e1..bd49ad6eba 100644
--- a/subprojects/gst-plugins-bad/gst/jpegformat/gstjpegparse.c
+++ b/subprojects/gst-plugins-bad/gst/jpegformat/gstjpegparse.c
@@ -50,6 +50,7 @@
* + APP3 -- meta (same as exif)
* + APP12 -- Photoshop Save for Web: Ducky / Picture info
* + APP13 -- Adobe IRB
+ * + check for interlaced mjpeg
*/
#ifdef HAVE_CONFIG_H
@@ -436,6 +437,18 @@ gst_jpeg_parse_app0 (GstJpegParse * parse, GstJpegSegment * seg)
return TRUE;
}
+ /* https://exiftool.org/TagNames/JPEG.html#AVI1 */
+ if (g_strcmp0 (id_str, "AVI1") == 0) {
+ /* polarity */
+ if (!gst_byte_reader_get_uint8 (&reader, &unit))
+ return FALSE;
+
+ /* TODO: update caps for interlaced MJPEG */
+ GST_DEBUG_OBJECT (parse, "MJPEG interleaved field: %d", unit);
+
+ return TRUE;
+ }
+
return FALSE;
}