@@ -1483,7 +1483,7 @@ static void mxf_write_avc_subdesc(AVFormatContext *s, AVStream *st)
1483
1483
mxf_update_klv_size (s -> pb , pos );
1484
1484
}
1485
1485
1486
- static void mxf_write_jpeg2000_subdesc (AVFormatContext * s , AVStream * st )
1486
+ static int mxf_write_jpeg2000_subdesc (AVFormatContext * s , AVStream * st )
1487
1487
{
1488
1488
MXFStreamContext * sc = st -> priv_data ;
1489
1489
AVIOContext * pb = s -> pb ;
@@ -1492,7 +1492,7 @@ static void mxf_write_jpeg2000_subdesc(AVFormatContext *s, AVStream *st)
1492
1492
1493
1493
if (!pix_desc ) {
1494
1494
av_log (s , AV_LOG_ERROR , "Pixel format not set - not writing JPEG2000SubDescriptor\n" );
1495
- return ;
1495
+ return AVERROR ( EINVAL ) ;
1496
1496
}
1497
1497
1498
1498
/* JPEG2000 subdescriptor key */
@@ -1543,6 +1543,7 @@ static void mxf_write_jpeg2000_subdesc(AVFormatContext *s, AVStream *st)
1543
1543
avio_write (pb , sc -> j2k_info .j2k_comp_desc , 3 * pix_desc -> nb_components );
1544
1544
1545
1545
mxf_update_klv_size (pb , pos );
1546
+ return 0 ;
1546
1547
}
1547
1548
1548
1549
static int mxf_write_cdci_desc (AVFormatContext * s , AVStream * st )
@@ -1554,7 +1555,7 @@ static int mxf_write_cdci_desc(AVFormatContext *s, AVStream *st)
1554
1555
mxf_write_avc_subdesc (s , st );
1555
1556
}
1556
1557
if (st -> codecpar -> codec_id == AV_CODEC_ID_JPEG2000 ) {
1557
- mxf_write_jpeg2000_subdesc (s , st );
1558
+ return mxf_write_jpeg2000_subdesc (s , st );
1558
1559
}
1559
1560
return 0 ;
1560
1561
}
0 commit comments