@@ -576,7 +576,8 @@ CAMLprim value caml_av_input_io_finalise(value _avio) {
576
576
577
577
/***** AVInputFormat *****/
578
578
579
- void value_of_inputFormat (AVInputFormat * inputFormat , value * p_value ) {
579
+ void value_of_inputFormat (avioformat_const AVInputFormat * inputFormat ,
580
+ value * p_value ) {
580
581
if (!inputFormat )
581
582
Fail ("Empty input format" );
582
583
@@ -594,7 +595,7 @@ CAMLprim value ocaml_av_find_input_format(value _short_name) {
594
595
caml_raise_out_of_memory ();
595
596
596
597
caml_release_runtime_system ();
597
- AVInputFormat * format = av_find_input_format (short_name );
598
+ avioformat_const AVInputFormat * format = av_find_input_format (short_name );
598
599
caml_acquire_runtime_system ();
599
600
600
601
free (short_name );
@@ -619,7 +620,7 @@ CAMLprim value ocaml_av_input_format_get_long_name(value _format) {
619
620
CAMLreturn (caml_copy_string (n ? n : "" ));
620
621
}
621
622
622
- static av_t * open_input (char * url , AVInputFormat * format ,
623
+ static av_t * open_input (char * url , avioformat_const AVInputFormat * format ,
623
624
AVFormatContext * format_context , value _interrupt ,
624
625
AVDictionary * * options ) {
625
626
int err ;
@@ -691,7 +692,7 @@ CAMLprim value ocaml_av_open_input(value _url, value _format, value _interrupt,
691
692
CAMLparam4 (_url , _format , _interrupt , _opts );
692
693
CAMLlocal3 (ret , ans , unused );
693
694
char * url = NULL ;
694
- AVInputFormat * format = NULL ;
695
+ avioformat_const AVInputFormat * format = NULL ;
695
696
int ulen = caml_string_length (_url );
696
697
AVDictionary * options = NULL ;
697
698
char * key , * val ;
@@ -756,7 +757,7 @@ CAMLprim value ocaml_av_open_input_stream(value _avio, value _format,
756
757
CAMLparam3 (_avio , _format , _opts );
757
758
CAMLlocal3 (ret , ans , unused );
758
759
avio_t * avio = Avio_val (_avio );
759
- AVInputFormat * format = NULL ;
760
+ avioformat_const AVInputFormat * format = NULL ;
760
761
AVDictionary * options = NULL ;
761
762
char * key , * val ;
762
763
int len = Wosize_val (_opts );
@@ -1275,7 +1276,7 @@ CAMLprim value ocaml_av_seek_bytecode(value *argv, int argn) {
1275
1276
1276
1277
/***** AVOutputFormat *****/
1277
1278
1278
- value value_of_outputFormat (AVOutputFormat * outputFormat ) {
1279
+ value value_of_outputFormat (avioformat_const AVOutputFormat * outputFormat ) {
1279
1280
value v ;
1280
1281
if (!outputFormat )
1281
1282
Fail ("Empty output format" );
@@ -1293,7 +1294,7 @@ CAMLprim value ocaml_av_output_format_guess(value _short_name, value _filename,
1293
1294
char * short_name = NULL ;
1294
1295
char * filename = NULL ;
1295
1296
char * mime = NULL ;
1296
- AVOutputFormat * guessed ;
1297
+ avioformat_const AVOutputFormat * guessed ;
1297
1298
1298
1299
if (caml_string_length (_short_name ) > 0 ) {
1299
1300
short_name =
@@ -1371,9 +1372,9 @@ ocaml_av_output_format_get_subtitle_codec_id(value _output_format) {
1371
1372
Val_SubtitleCodecID (OutputFormat_val (_output_format )-> subtitle_codec ));
1372
1373
}
1373
1374
1374
- static av_t * open_output (AVOutputFormat * format , char * file_name ,
1375
- AVIOContext * avio_context , value _interrupt ,
1376
- AVDictionary * * options ) {
1375
+ static av_t * open_output (avioformat_const AVOutputFormat * format ,
1376
+ char * file_name , AVIOContext * avio_context ,
1377
+ value _interrupt , AVDictionary * * options ) {
1377
1378
int ret ;
1378
1379
AVIOInterruptCB interrupt_cb = {ocaml_av_interrupt_callback , NULL };
1379
1380
AVIOInterruptCB * interrupt_cb_ptr = NULL ;
@@ -1487,7 +1488,7 @@ CAMLprim value ocaml_av_open_output(value _interrupt, value _format,
1487
1488
CAMLlocal3 (ans , ret , unused );
1488
1489
char * filename =
1489
1490
strndup (String_val (_filename ), caml_string_length (_filename ));
1490
- AVOutputFormat * format = NULL ;
1491
+ avioformat_const AVOutputFormat * format = NULL ;
1491
1492
AVDictionary * options = NULL ;
1492
1493
char * key , * val ;
1493
1494
int len = Wosize_val (_opts );
@@ -1554,7 +1555,7 @@ CAMLprim value ocaml_av_open_output_format(value _format, value _opts) {
1554
1555
}
1555
1556
}
1556
1557
1557
- AVOutputFormat * format = OutputFormat_val (_format );
1558
+ avioformat_const AVOutputFormat * format = OutputFormat_val (_format );
1558
1559
1559
1560
// open output format
1560
1561
av_t * av = open_output (format , NULL , NULL , Val_none , & options );
@@ -1588,7 +1589,7 @@ CAMLprim value ocaml_av_open_output_stream(value _format, value _avio,
1588
1589
value _opts ) {
1589
1590
CAMLparam3 (_format , _avio , _opts );
1590
1591
CAMLlocal3 (ans , ret , unused );
1591
- AVOutputFormat * format = OutputFormat_val (_format );
1592
+ avioformat_const AVOutputFormat * format = OutputFormat_val (_format );
1592
1593
avio_t * avio = Avio_val (_avio );
1593
1594
AVDictionary * options = NULL ;
1594
1595
char * key , * val ;
0 commit comments