avpacket: signal possibly corrupted packets
Use AV_PKT_FLAG_CORRUPT flag to mark packets that might be incomplete or have errors. Formats that have a mean to validate their packets should use this flag to deliver such information instead of silently dropping the packets.
This commit is contained in:
parent
4326f6f525
commit
9d39cbf6cf
@ -791,6 +791,9 @@ typedef struct AVPacket {
|
|||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
int size;
|
int size;
|
||||||
int stream_index;
|
int stream_index;
|
||||||
|
/**
|
||||||
|
* A combination of AV_PKT_FLAG values
|
||||||
|
*/
|
||||||
int flags;
|
int flags;
|
||||||
/**
|
/**
|
||||||
* Additional packet data that can be provided by the container.
|
* Additional packet data that can be provided by the container.
|
||||||
@ -831,7 +834,8 @@ typedef struct AVPacket {
|
|||||||
*/
|
*/
|
||||||
int64_t convergence_duration;
|
int64_t convergence_duration;
|
||||||
} AVPacket;
|
} AVPacket;
|
||||||
#define AV_PKT_FLAG_KEY 0x0001
|
#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
|
||||||
|
#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Audio Video Frame.
|
* Audio Video Frame.
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#define LIBAVCODEC_VERSION_MAJOR 53
|
#define LIBAVCODEC_VERSION_MAJOR 53
|
||||||
#define LIBAVCODEC_VERSION_MINOR 7
|
#define LIBAVCODEC_VERSION_MINOR 7
|
||||||
#define LIBAVCODEC_VERSION_MICRO 0
|
#define LIBAVCODEC_VERSION_MICRO 1
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||||
LIBAVCODEC_VERSION_MINOR, \
|
LIBAVCODEC_VERSION_MINOR, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user