* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
-#include "get_bits.h"
-#include "internal.h"
+#include "decode.h"
#define FRAME_HEADER_SIZE 64
if (header[28] == NOT_COMPRESSED) {
frame->pict_type = AV_PICTURE_TYPE_I;
- frame->key_frame = 1;
+ frame->flags |= AV_FRAME_FLAG_KEY;
} else {
frame->pict_type = AV_PICTURE_TYPE_P;
- frame->key_frame = 0;
+ frame->flags &= ~AV_FRAME_FLAG_KEY;
}
// Get buffer filled with previous frame
// output pixel format
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
- /* The default timebase set by the v4l2 demuxer leads to probing which is buggy.
- * Set some reasonable time_base to skip this.
- */
- if (avctx->time_base.num == 1 && avctx->time_base.den == 1000000) {
- avctx->time_base.num = 1;
- avctx->time_base.den = 60;
- }
-
s->frame = av_frame_alloc();
if (!s->frame)
return AVERROR(ENOMEM);
const FFCodec ff_cpia_decoder = {
.p.name = "cpia",
- .p.long_name = NULL_IF_CONFIG_SMALL("CPiA video format"),
+ CODEC_LONG_NAME("CPiA video format"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_CPIA,
.priv_data_size = sizeof(CpiaContext),
.close = cpia_decode_end,
FF_CODEC_DECODE_CB(cpia_decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};