FFMPEG plugin: Tell the FFMPEG library to handle incomplete data.
- It is just one flag that needs to be set, so that streaming video data can be handled by the FFMPEG library. - For reference: This flag is based on FFMPEG's 0.10.2 video decode example (doc/example/decoding_encoding.c). - The _DecodeNextVideoFrame() method needs to be adjusted (still to come), to take streamed data into account. So the flag on its own doesn't help, but it is a reasonable step in that direction. Signed-off-by: Colin Günther <[email protected]>
This commit is contained in:
@@ -430,6 +430,11 @@ AVCodecDecoder::_NegotiateVideoOutputFormat(media_format* inOutFormat)
|
|||||||
fContext->extradata = (uint8_t*)fExtraData;
|
fContext->extradata = (uint8_t*)fExtraData;
|
||||||
fContext->extradata_size = fExtraDataSize;
|
fContext->extradata_size = fExtraDataSize;
|
||||||
|
|
||||||
|
if (fCodec->capabilities & CODEC_CAP_TRUNCATED)
|
||||||
|
// Expect and handle video frames to be splitted across consecutive
|
||||||
|
// data chunks.
|
||||||
|
fContext->flags |= CODEC_FLAG_TRUNCATED;
|
||||||
|
|
||||||
TRACE(" requested video format 0x%x\n",
|
TRACE(" requested video format 0x%x\n",
|
||||||
inOutFormat->u.raw_video.display.format);
|
inOutFormat->u.raw_video.display.format);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user