You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2'
* commit 'cab63a8b594cdc365bb2581a12b3ac8e6dd480b2': dv: Mark internal frame reference as const Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ typedef struct DVwork_chunk {
|
|||||||
|
|
||||||
typedef struct DVVideoContext {
|
typedef struct DVVideoContext {
|
||||||
const AVDVProfile *sys;
|
const AVDVProfile *sys;
|
||||||
AVFrame *frame;
|
const AVFrame *frame;
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
|
|
||||||
|
@@ -499,6 +499,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
uint8_t *buf = avpkt->data;
|
uint8_t *buf = avpkt->data;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
DVVideoContext *s = avctx->priv_data;
|
DVVideoContext *s = avctx->priv_data;
|
||||||
|
AVFrame *frame = data;
|
||||||
const uint8_t *vsc_pack;
|
const uint8_t *vsc_pack;
|
||||||
int apt, is16_9, ret;
|
int apt, is16_9, ret;
|
||||||
const AVDVProfile *sys;
|
const AVDVProfile *sys;
|
||||||
@@ -519,9 +520,9 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
s->sys = sys;
|
s->sys = sys;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->frame = data;
|
s->frame = frame;
|
||||||
s->frame->key_frame = 1;
|
frame->key_frame = 1;
|
||||||
s->frame->pict_type = AV_PICTURE_TYPE_I;
|
frame->pict_type = AV_PICTURE_TYPE_I;
|
||||||
avctx->pix_fmt = s->sys->pix_fmt;
|
avctx->pix_fmt = s->sys->pix_fmt;
|
||||||
avctx->framerate = av_inv_q(s->sys->time_base);
|
avctx->framerate = av_inv_q(s->sys->time_base);
|
||||||
|
|
||||||
@@ -538,14 +539,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
ff_set_sar(avctx, s->sys->sar[is16_9]);
|
ff_set_sar(avctx, s->sys->sar[is16_9]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
s->frame->interlaced_frame = 1;
|
frame->interlaced_frame = 1;
|
||||||
s->frame->top_field_first = 0;
|
frame->top_field_first = 0;
|
||||||
|
|
||||||
/* Determine the codec's field order from the packet */
|
/* Determine the codec's field order from the packet */
|
||||||
if ( *vsc_pack == dv_video_control ) {
|
if ( *vsc_pack == dv_video_control ) {
|
||||||
s->frame->top_field_first = !(vsc_pack[3] & 0x40);
|
frame->top_field_first = !(vsc_pack[3] & 0x40);
|
||||||
}
|
}
|
||||||
|
|
||||||
s->buf = buf;
|
s->buf = buf;
|
||||||
|
Reference in New Issue
Block a user