lavc: add format field to AVFrame

The format is a per-frame property, having it in AVFrame simplify the
operation of extraction of that information, since avoids the need to
access the codec/stream context.
This commit is contained in:
Stefano Sabatini
2011-05-01 14:10:20 +02:00
committed by Anton Khirnov
parent 3a2ddf7c2c
commit 8a4a5f6ff7
3 changed files with 14 additions and 0 deletions

View File

@@ -1272,6 +1272,15 @@ typedef struct AVFrame {
* - decoding: Read by user.
*/
int width, height;
/**
* format of the frame, -1 if unknown or unset
* Values correspond to enum PixelFormat for video frames,
* enum AVSampleFormat for audio)
* - encoding: unused
* - decoding: Read by user.
*/
int format;
} AVFrame;
struct AVCodecInternal;