Skip to content

Commit 9ed6845

Browse files
authored
FFMPEG: fixed frame wrapping detection for MXFGCP1FrameWrappedPicture Element (#27)
1 parent 477f975 commit 9ed6845

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libavformat/mxf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ typedef enum {
7575
NormalWrap = 0,
7676
D10D11Wrap,
7777
RawAWrap,
78-
RawVWrap
78+
RawVWrap,
79+
AlwaysFrameWrap
7980
} MXFWrappingIndicatorType;
8081

8182
typedef struct MXFLocalTagPair {

libavformat/mxfdec.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,7 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe
14131413

14141414
static const MXFCodecUL mxf_picture_essence_container_uls[] = {
14151415
// video essence container uls
1416+
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x06,0x00 }, 15, AV_CODEC_ID_JPEG2000, NULL, 16, AlwaysFrameWrap }, /* MXF-GC P1 Frame-Wrapped JPEG 2000 */
14161417
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000, NULL, 14 },
14171418
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14, AV_CODEC_ID_H264, NULL, 15 }, /* H.264 */
14181419
{ { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x11,0x01,0x00 }, 14, AV_CODEC_ID_DNXHD, NULL, 14 }, /* VC-3 */
@@ -1497,6 +1498,9 @@ static MXFWrappingScheme mxf_get_wrapping_kind(UID *essence_container_ul)
14971498
if (val == 0x02)
14981499
val = 0x01;
14991500
break;
1501+
case AlwaysFrameWrap:
1502+
val = 0x01;
1503+
break;
15001504
}
15011505
if (val == 0x01)
15021506
return FrameWrapped;

0 commit comments

Comments
 (0)