~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-security

« back to all changes in this revision

Viewing changes to libavformat/avformat.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#define AVFORMAT_AVFORMAT_H
23
23
 
24
24
#define LIBAVFORMAT_VERSION_MAJOR 52
25
 
#define LIBAVFORMAT_VERSION_MINOR 25
 
25
#define LIBAVFORMAT_VERSION_MINOR 31
26
26
#define LIBAVFORMAT_VERSION_MICRO  0
27
27
 
28
28
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
46
46
 
47
47
#include "avio.h"
48
48
 
 
49
struct AVFormatContext;
 
50
 
49
51
 
50
52
/*
51
53
 * Public Metadata API.
52
 
 * !!WARNING!! This is a work in progress. Don't use outside FFmpeg for now.
53
54
 * The metadata API allows libavformat to export metadata tags to a client
54
55
 * application using a sequence of key/value pairs.
55
56
 * Important concepts to keep in mind:
77
78
}AVMetadataTag;
78
79
 
79
80
typedef struct AVMetadata AVMetadata;
 
81
typedef struct AVMetadataConv AVMetadataConv;
80
82
 
81
83
/**
82
 
 * gets a metadata element with matching key.
83
 
 * @param prev set to the previous matching element to find the next.
84
 
 * @param flags allows case as well as suffix insensitive comparisons.
85
 
 * @return found tag or NULL, changing key or value leads to undefined behavior.
 
84
 * Gets a metadata element with matching key.
 
85
 * @param prev Set to the previous matching element to find the next.
 
86
 * @param flags Allows case as well as suffix-insensitive comparisons.
 
87
 * @return Found tag or NULL, changing key or value leads to undefined behavior.
86
88
 */
87
89
AVMetadataTag *
88
90
av_metadata_get(AVMetadata *m, const char *key, const AVMetadataTag *prev, int flags);
89
91
 
90
92
/**
91
 
 * sets the given tag in m, overwriting an existing tag.
92
 
 * @param key tag key to add to m (will be av_strduped).
93
 
 * @param value tag value to add to m (will be av_strduped).
94
 
 * @return >= 0 if success otherwise error code that is <0.
 
93
 * Sets the given tag in m, overwriting an existing tag.
 
94
 * @param key tag key to add to m (will be av_strduped)
 
95
 * @param value tag value to add to m (will be av_strduped)
 
96
 * @return >= 0 on success otherwise an error code <0
95
97
 */
96
98
int av_metadata_set(AVMetadata **pm, const char *key, const char *value);
97
99
 
98
100
/**
99
 
 * Free all the memory allocated for an AVMetadata struct.
 
101
 * Convert all the metadata sets from ctx according to the source and
 
102
 * destination conversion tables.
 
103
 * @param d_conv destination tags format conversion table
 
104
 * @param s_conv source tags format conversion table
 
105
 */
 
106
void av_metadata_conv(struct AVFormatContext *ctx,const AVMetadataConv *d_conv,
 
107
                                                  const AVMetadataConv *s_conv);
 
108
 
 
109
/**
 
110
 * Frees all the memory allocated for an AVMetadata struct.
100
111
 */
101
112
void av_metadata_free(AVMetadata **m);
102
113
 
105
116
 
106
117
typedef struct AVPacket {
107
118
    /**
108
 
     * Presentation timestamp in time_base units.
109
 
     * This is the time at which the decompressed packet will be presented
110
 
     * to the user.
 
119
     * Presentation timestamp in time_base units; the time at which the
 
120
     * decompressed packet will be presented to the user.
111
121
     * Can be AV_NOPTS_VALUE if it is not stored in the file.
112
122
     * pts MUST be larger or equal to dts as presentation cannot happen before
113
123
     * decompression, unless one wants to view hex dumps. Some formats misuse
114
 
     * the terms dts and pts/cts to mean something different, these timestamps
 
124
     * the terms dts and pts/cts to mean something different. Such timestamps
115
125
     * must be converted to true pts/dts before they are stored in AVPacket.
116
126
     */
117
127
    int64_t pts;
118
128
    /**
119
 
     * Decompression timestamp in time_base units.
120
 
     * This is the time at which the packet is decompressed.
 
129
     * Decompression timestamp in time_base units; the time at which the
 
130
     * packet is decompressed.
121
131
     * Can be AV_NOPTS_VALUE if it is not stored in the file.
122
132
     */
123
133
    int64_t dts;
211
221
/**
212
222
 * The exact value of the fractional number is: 'val + num / den'.
213
223
 * num is assumed to be 0 <= num < den.
214
 
 * @deprecated Use AVRational instead.
215
 
*/
 
224
 */
216
225
typedef struct AVFrac {
217
226
    int64_t val, num, den;
218
227
} AVFrac;
222
231
 
223
232
struct AVCodecTag;
224
233
 
225
 
struct AVFormatContext;
226
 
 
227
234
/** This structure contains the data a format has to probe a file. */
228
235
typedef struct AVProbeData {
229
236
    const char *filename;
231
238
    int buf_size;
232
239
} AVProbeData;
233
240
 
234
 
#define AVPROBE_SCORE_MAX 100               ///< Maximum score, half of that is used for file-extension-based detection.
 
241
#define AVPROBE_SCORE_MAX 100               ///< maximum score, half of that is used for file-extension-based detection
235
242
#define AVPROBE_PADDING_SIZE 32             ///< extra allocated bytes at the end of the probe buffer
236
243
 
237
244
typedef struct AVFormatParameters {
266
273
#define AVFMT_NOTIMESTAMPS  0x0080 /**< Format does not need / have any timestamps. */
267
274
#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */
268
275
#define AVFMT_TS_DISCONT    0x0200 /**< Format allows timestamp discontinuities. */
 
276
#define AVFMT_VARIABLE_FPS  0x0400 /**< Format allows variable fps. */
269
277
 
270
278
typedef struct AVOutputFormat {
271
279
    const char *name;
277
285
    const char *long_name;
278
286
    const char *mime_type;
279
287
    const char *extensions; /**< comma-separated filename extensions */
280
 
    /** Size of private data so that it can be allocated in the wrapper. */
 
288
    /** size of private data so that it can be allocated in the wrapper */
281
289
    int priv_data_size;
282
290
    /* output support */
283
291
    enum CodecID audio_codec; /**< default audio codec */
294
302
 
295
303
    /**
296
304
     * List of supported codec_id-codec_tag pairs, ordered by "better
297
 
     * choice first". The arrays are all CODEC_ID_NONE terminated.
 
305
     * choice first". The arrays are all terminated by CODEC_ID_NONE.
298
306
     */
299
307
    const struct AVCodecTag * const *codec_tag;
300
308
 
301
309
    enum CodecID subtitle_codec; /**< default subtitle codec */
302
310
 
 
311
    const AVMetadataConv *metadata_conv;
 
312
 
303
313
    /* private fields */
304
314
    struct AVOutputFormat *next;
305
315
} AVOutputFormat;
315
325
    /** Size of private data so that it can be allocated in the wrapper. */
316
326
    int priv_data_size;
317
327
    /**
318
 
     * Tell if a given file has a chance of being parsed by this format.
 
328
     * Tell if a given file has a chance of being parsed as this format.
319
329
     * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes
320
330
     * big so you do not have to check for that unless you need more.
321
331
     */
333
343
    /** Close the stream. The AVFormatContext and AVStreams are not
334
344
       freed by this function */
335
345
    int (*read_close)(struct AVFormatContext *);
 
346
 
 
347
#if LIBAVFORMAT_VERSION_MAJOR < 53
336
348
    /**
337
349
     * Seek to a given timestamp relative to the frames in
338
350
     * stream component stream_index.
339
 
     * @param stream_index must not be -1
340
 
     * @param flags selects which direction should be preferred if no exact
341
 
     *              match is available
 
351
     * @param stream_index Must not be -1.
 
352
     * @param flags Selects which direction should be preferred if no exact
 
353
     *              match is available.
342
354
     * @return >= 0 on success (but not necessarily the new offset)
343
355
     */
344
356
    int (*read_seek)(struct AVFormatContext *,
345
357
                     int stream_index, int64_t timestamp, int flags);
 
358
#endif
346
359
    /**
347
360
     * Gets the next timestamp in stream[stream_index].time_base units.
348
361
     * @return the timestamp or AV_NOPTS_VALUE if an error occurred
368
381
 
369
382
    const struct AVCodecTag * const *codec_tag;
370
383
 
 
384
    /**
 
385
     * Seek to timestamp ts.
 
386
     * Seeking will be done so that the point from which all active streams
 
387
     * can be presented successfully will be closest to ts and within min/max_ts.
 
388
     * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
 
389
     */
 
390
    int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
 
391
 
 
392
    const AVMetadataConv *metadata_conv;
 
393
 
371
394
    /* private fields */
372
395
    struct AVInputFormat *next;
373
396
} AVInputFormat;
407
430
    int id;       /**< format-specific stream ID */
408
431
    AVCodecContext *codec; /**< codec context */
409
432
    /**
410
 
     * Real base frame rate of the stream.
411
 
     * This is the lowest frame rate with which all timestamps can be
 
433
     * Real base framerate of the stream.
 
434
     * This is the lowest framerate with which all timestamps can be
412
435
     * represented accurately (it is the least common multiple of all
413
 
     * frame rates in the stream). Note, this value is just a guess!
414
 
     * For example if the time base is 1/90000 and all frames have either
 
436
     * framerates in the stream). Note, this value is just a guess!
 
437
     * For example, if the time base is 1/90000 and all frames have either
415
438
     * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1.
416
439
     */
417
440
    AVRational r_frame_rate;
425
448
    /**
426
449
     * This is the fundamental unit of time (in seconds) in terms
427
450
     * of which frame timestamps are represented. For fixed-fps content,
428
 
     * time base should be 1/frame rate and timestamp increments should be 1.
 
451
     * time base should be 1/framerate and timestamp increments should be 1.
429
452
     */
430
453
    AVRational time_base;
431
454
    int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */
452
475
     */
453
476
    int64_t duration;
454
477
 
 
478
#if LIBAVFORMAT_VERSION_INT < (53<<16)
455
479
    char language[4]; /** ISO 639 3-letter language code (empty string if undefined) */
 
480
#endif
456
481
 
457
482
    /* av_read_frame() support */
458
483
    enum AVStreamParseType need_parsing;
471
496
 
472
497
#if LIBAVFORMAT_VERSION_INT < (53<<16)
473
498
    int64_t unused[4+1];
474
 
#endif
475
499
 
476
500
    char *filename; /**< source filename of the stream */
 
501
#endif
477
502
 
478
503
    int disposition; /**< AV_DISPOSITION_* bit field */
479
504
 
494
519
    const uint8_t *cur_ptr;
495
520
    int cur_len;
496
521
    AVPacket cur_pkt;
 
522
 
 
523
    // Timestamp generation support:
 
524
    /**
 
525
     * Timestamp corresponding to the last dts sync point.
 
526
     *
 
527
     * Initialized when AVCodecParserContext.dts_sync_point >= 0 and
 
528
     * a DTS is received from the underlying container. Otherwise set to
 
529
     * AV_NOPTS_VALUE by default.
 
530
     */
 
531
    int64_t reference_dts;
497
532
} AVStream;
498
533
 
499
534
#define AV_PROGRAM_RUNNING 1
506
541
 */
507
542
typedef struct AVProgram {
508
543
    int            id;
 
544
#if LIBAVFORMAT_VERSION_INT < (53<<16)
509
545
    char           *provider_name; ///< network name for DVB streams
510
546
    char           *name;          ///< service name for DVB streams
 
547
#endif
511
548
    int            flags;
512
549
    enum AVDiscard discard;        ///< selects which program to discard and which to feed to the caller
513
550
    unsigned int   *stream_index;
522
559
    int id;                 ///< unique ID to identify the chapter
523
560
    AVRational time_base;   ///< time base in which the start/end timestamps are specified
524
561
    int64_t start, end;     ///< chapter start/end time in time_base units
 
562
#if LIBAVFORMAT_VERSION_INT < (53<<16)
525
563
    char *title;            ///< chapter title
 
564
#endif
526
565
    AVMetadata *metadata;
527
566
} AVChapter;
528
567
 
536
575
 * sizeof(AVFormatContext) must not be used outside libav*.
537
576
 */
538
577
typedef struct AVFormatContext {
539
 
    const AVClass *av_class; /**< Set by av_alloc_format_context. */
 
578
    const AVClass *av_class; /**< Set by avformat_alloc_context. */
540
579
    /* Can only be iformat or oformat, not both at the same time. */
541
580
    struct AVInputFormat *iformat;
542
581
    struct AVOutputFormat *oformat;
547
586
    char filename[1024]; /**< input or output filename */
548
587
    /* stream info */
549
588
    int64_t timestamp;
 
589
#if LIBAVFORMAT_VERSION_INT < (53<<16)
550
590
    char title[512];
551
591
    char author[512];
552
592
    char copyright[512];
555
595
    int year;  /**< ID3 year, 0 if none */
556
596
    int track; /**< track number, 0 if none */
557
597
    char genre[32]; /**< ID3 genre */
 
598
#endif
558
599
 
559
600
    int ctx_flags; /**< Format-specific flags, see AVFMTCTX_xx */
560
601
    /* private data for pts handling (do not modify directly). */
575
616
    int64_t file_size;
576
617
    /** Decoding: total stream bitrate in bit/s, 0 if not
577
618
       available. Never set it directly if the file_size and the
578
 
       duration are known as ffmpeg can compute it automatically. */
 
619
       duration are known as FFmpeg can compute it automatically. */
579
620
    int bit_rate;
580
621
 
581
622
    /* av_read_frame() support */
601
642
    int loop_output;
602
643
 
603
644
    int flags;
604
 
#define AVFMT_FLAG_GENPTS       0x0001 ///< Generate pts if missing even if it requires parsing future frames.
 
645
#define AVFMT_FLAG_GENPTS       0x0001 ///< Generate missing pts even if it requires parsing future frames.
605
646
#define AVFMT_FLAG_IGNIDX       0x0002 ///< Ignore index.
606
647
#define AVFMT_FLAG_NONBLOCK     0x0004 ///< Do not block when reading packets from input.
607
648
 
608
649
    int loop_input;
609
 
    /** Decoding: size of data to probe; encoding: unused. */
 
650
    /** decoding: size of data to probe; encoding: unused. */
610
651
    unsigned int probesize;
611
652
 
612
653
    /**
638
679
    enum CodecID subtitle_codec_id;
639
680
 
640
681
    /**
641
 
     * Maximum amount of memory in bytes to use per stream for the index.
642
 
     * If the needed index exceeds this size, entries will be discarded as
 
682
     * Maximum amount of memory in bytes to use for the index of each stream.
 
683
     * If the index exceeds this size, entries will be discarded as
643
684
     * needed to maintain a smaller size. This can lead to slower or less
644
685
     * accurate seeking (depends on demuxer).
645
686
     * Demuxers for which a full in-memory index is mandatory will ignore
688
729
extern AVOutputFormat *first_oformat;
689
730
#endif
690
731
 
 
732
/**
 
733
 * If f is NULL, returns the first registered input format,
 
734
 * if f is non-NULL, returns the next registered input format after f
 
735
 * or NULL if f is the last one.
 
736
 */
691
737
AVInputFormat  *av_iformat_next(AVInputFormat  *f);
 
738
 
 
739
/**
 
740
 * If f is NULL, returns the first registered output format,
 
741
 * if f is non-NULL, returns the next registered output format after f
 
742
 * or NULL if f is the last one.
 
743
 */
692
744
AVOutputFormat *av_oformat_next(AVOutputFormat *f);
693
745
 
694
746
enum CodecID av_guess_image2_codec(const char *filename);
695
747
 
696
 
/* XXX: use automatic init with either ELF sections or C file parser */
697
 
/* modules */
 
748
/* XXX: Use automatic init with either ELF sections or C file parser */
 
749
/* modules. */
698
750
 
699
751
/* utils.c */
700
752
void av_register_input_format(AVInputFormat *format);
766
818
 *
767
819
 * @see av_register_input_format()
768
820
 * @see av_register_output_format()
769
 
 * @see register_protocol()
 
821
 * @see av_register_protocol()
770
822
 */
771
823
void av_register_all(void);
772
824
 
813
865
                       AVInputFormat *fmt,
814
866
                       int buf_size,
815
867
                       AVFormatParameters *ap);
 
868
 
 
869
#if LIBAVFORMAT_VERSION_MAJOR < 53
 
870
/**
 
871
 * @deprecated Use avformat_alloc_context() instead.
 
872
 */
 
873
attribute_deprecated AVFormatContext *av_alloc_format_context(void);
 
874
#endif
 
875
 
816
876
/**
817
877
 * Allocate an AVFormatContext.
818
878
 * Can be freed with av_free() but do not forget to free everything you
819
879
 * explicitly allocated as well!
820
880
 */
821
 
AVFormatContext *av_alloc_format_context(void);
 
881
AVFormatContext *avformat_alloc_context(void);
822
882
 
823
883
/**
824
884
 * Read packets of a media file to get stream information. This
825
885
 * is useful for file formats with no headers such as MPEG. This
826
 
 * function also computes the real frame rate in case of MPEG-2 repeat
 
886
 * function also computes the real framerate in case of MPEG-2 repeat
827
887
 * frame mode.
828
888
 * The logical file position is not changed by this function;
829
889
 * examined packets may be buffered for later processing.
859
919
 * then it contains one frame.
860
920
 *
861
921
 * pkt->pts, pkt->dts and pkt->duration are always set to correct
862
 
 * values in AVStream.timebase units (and guessed if the format cannot
 
922
 * values in AVStream.time_base units (and guessed if the format cannot
863
923
 * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format
864
924
 * has B-frames, so it is better to rely on pkt->dts if you do not
865
925
 * decompress the payload.
869
929
int av_read_frame(AVFormatContext *s, AVPacket *pkt);
870
930
 
871
931
/**
872
 
 * Seek to the key frame at timestamp.
 
932
 * Seek to the keyframe at timestamp.
873
933
 * 'timestamp' in 'stream_index'.
874
934
 * @param stream_index If stream_index is (-1), a default
875
935
 * stream is selected, and timestamp is automatically converted
883
943
                  int flags);
884
944
 
885
945
/**
886
 
 * Start playing a network based stream (e.g. RTSP stream) at the
 
946
 * Seek to timestamp ts.
 
947
 * Seeking will be done so that the point from which all active streams
 
948
 * can be presented successfully will be closest to ts and within min/max_ts.
 
949
 * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
 
950
 *
 
951
 * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and
 
952
 * are the file position (this may not be supported by all demuxers).
 
953
 * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames
 
954
 * in the stream with stream_index (this may not be supported by all demuxers).
 
955
 * Otherwise all timestamps are in units of the stream selected by stream_index
 
956
 * or if stream_index is -1, in AV_TIME_BASE units.
 
957
 * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as
 
958
 * keyframes (this may not be supported by all demuxers).
 
959
 *
 
960
 * @param stream_index index of the stream which is used as time base reference
 
961
 * @param min_ts smallest acceptable timestamp
 
962
 * @param ts target timestamp
 
963
 * @param max_ts largest acceptable timestamp
 
964
 * @param flags flags
 
965
 * @returns >=0 on success, error code otherwise
 
966
 *
 
967
 * @NOTE This is part of the new seek API which is still under construction.
 
968
 *       Thus do not use this yet. It may change at any time, do not expect
 
969
 *       ABI compatibility yet!
 
970
 */
 
971
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags);
 
972
 
 
973
/**
 
974
 * Start playing a network-based stream (e.g. RTSP stream) at the
887
975
 * current position.
888
976
 */
889
977
int av_read_play(AVFormatContext *s);
890
978
 
891
979
/**
892
 
 * Pause a network based stream (e.g. RTSP stream).
 
980
 * Pause a network-based stream (e.g. RTSP stream).
893
981
 *
894
982
 * Use av_read_play() to resume it.
895
983
 */
967
1055
 
968
1056
/**
969
1057
 * Ensures the index uses less memory than the maximum specified in
970
 
 * AVFormatContext.max_index_size, by discarding entries if it grows
 
1058
 * AVFormatContext.max_index_size by discarding entries if it grows
971
1059
 * too large.
972
1060
 * This function is not part of the public API and should only be called
973
1061
 * by demuxers.
1048
1136
 * Writes a packet to an output media file ensuring correct interleaving.
1049
1137
 *
1050
1138
 * The packet must contain one audio or video frame.
1051
 
 * If the packets are already correctly interleaved the application should
 
1139
 * If the packets are already correctly interleaved, the application should
1052
1140
 * call av_write_frame() instead as it is slightly faster. It is also important
1053
1141
 * to keep in mind that completely non-interleaved input will need huge amounts
1054
1142
 * of memory to interleave with this, so it is preferable to interleave at the
1065
1153
 * Interleave a packet per dts in an output media file.
1066
1154
 *
1067
1155
 * Packets with pkt->destruct == av_destruct_packet will be freed inside this
1068
 
 * function, so they cannot be used after it, note calling av_free_packet()
 
1156
 * function, so they cannot be used after it. Note that calling av_free_packet()
1069
1157
 * on them is still safe.
1070
1158
 *
1071
1159
 * @param s media file handle
1104
1192
                                          const char *str);
1105
1193
 
1106
1194
/**
1107
 
 * Converts frame rate from string to a fraction.
 
1195
 * Converts framerate from a string to a fraction.
1108
1196
 * @deprecated Use av_parse_video_frame_rate instead.
1109
1197
 */
1110
1198
attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base,
1145
1233
/* ffm-specific for ffserver */
1146
1234
#define FFM_PACKET_SIZE 4096
1147
1235
int64_t ffm_read_write_index(int fd);
1148
 
void ffm_write_write_index(int fd, int64_t pos);
 
1236
int ffm_write_write_index(int fd, int64_t pos);
1149
1237
void ffm_set_write_index(AVFormatContext *s, int64_t pos, int64_t file_size);
1150
1238
 
1151
1239
/**
1157
1245
int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
1158
1246
 
1159
1247
/**
1160
 
 * Returns in 'buf' the path with '%d' replaced by number.
 
1248
 * Returns in 'buf' the path with '%d' replaced by a number.
1161
1249
 *
1162
1250
 * Also handles the '%0nd' format where 'n' is the total number
1163
1251
 * of digits and '%%'.
1197
1285
 
1198
1286
#ifdef HAVE_AV_CONFIG_H
1199
1287
 
1200
 
void ff_dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem);
 
1288
void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
1201
1289
 
1202
1290
#ifdef __GNUC__
1203
1291
#define dynarray_add(tab, nb_ptr, elem)\
1205
1293
    __typeof__(tab) _tab = (tab);\
1206
1294
    __typeof__(elem) _elem = (elem);\
1207
1295
    (void)sizeof(**_tab == _elem); /* check that types are compatible */\
1208
 
    ff_dynarray_add((unsigned long **)_tab, nb_ptr, (unsigned long)_elem);\
 
1296
    ff_dynarray_add((intptr_t **)_tab, nb_ptr, (intptr_t)_elem);\
1209
1297
} while(0)
1210
1298
#else
1211
1299
#define dynarray_add(tab, nb_ptr, elem)\
1212
1300
do {\
1213
 
    ff_dynarray_add((unsigned long **)(tab), nb_ptr, (unsigned long)(elem));\
 
1301
    ff_dynarray_add((intptr_t **)(tab), nb_ptr, (intptr_t)(elem));\
1214
1302
} while(0)
1215
1303
#endif
1216
1304