56 pkt->stream_index = 0;
79 for (
int corrupt = 0; corrupt < 3; corrupt++) {
88 s->max_analyze_duration = 500000;
90 s->fps_probe_size = 1000;
96 printf(
"%s: packets=%d fps=%d/%d\n",
97 corrupt == 2 ?
"corrupt-long" : corrupt ?
"corrupt" :
"clean",
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
__device__ int printf(const char *,...)
static const FFInputFormat test_demuxer
static int read_packet(AVFormatContext *s, AVPacket *pkt)
static int corrupt_duration
static int read_header(AVFormatContext *s)
static int read_header(FFV1Context *f, RangeCoder *c)
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_log_set_level(int level)
Set the log level.
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
int height
The height of the video frame in pixels.
int width
The width of the video frame in pixels.
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
Rational number (pair of numerator and denominator).
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.