[FFmpeg-cvslog] avcodec/flashsv2enc: drop dependancy on sizeof(AVFrame)
Michael Niedermayer
git at videolan.org
Tue Jan 7 21:35:30 CET 2014
ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 17 16:27:36 2013 +0100| [4d4a10cfa1ecc9381b925b6b6c10d6956c5ec783] | committer: Michael Niedermayer
avcodec/flashsv2enc: drop dependancy on sizeof(AVFrame)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b8f4410ff60b3a973cd13351d00a1d88eaddfb71)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d4a10cfa1ecc9381b925b6b6c10d6956c5ec783
---
libavcodec/flashsv2enc.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 2115a46..436daa4 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -87,7 +87,6 @@ typedef struct FlashSV2Context {
AVCodecContext *avctx;
uint8_t *current_frame;
uint8_t *key_frame;
- AVFrame frame;
uint8_t *encbuffer;
uint8_t *keybuffer;
uint8_t *databuffer;
@@ -849,15 +848,12 @@ static int reconfigure_at_keyframe(FlashSV2Context * s, const uint8_t * image,
}
static int flashsv2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
- const AVFrame *pict, int *got_packet)
+ const AVFrame *p, int *got_packet)
{
FlashSV2Context *const s = avctx->priv_data;
- AVFrame *const p = &s->frame;
int res;
int keyframe = 0;
- *p = *pict;
-
if ((res = ff_alloc_packet2(avctx, pkt, s->frame_size + FF_MIN_BUFFER_SIZE)) < 0)
return res;
@@ -891,18 +887,11 @@ static int flashsv2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (keyframe) {
new_key_frame(s);
- p->pict_type = AV_PICTURE_TYPE_I;
- p->key_frame = 1;
s->last_key_frame = avctx->frame_number;
pkt->flags |= AV_PKT_FLAG_KEY;
av_log(avctx, AV_LOG_DEBUG, "Inserting key frame at frame %d\n", avctx->frame_number);
- } else {
- p->pict_type = AV_PICTURE_TYPE_P;
- p->key_frame = 0;
}
- avctx->coded_frame = p;
-
pkt->size = res;
*got_packet = 1;
More information about the ffmpeg-cvslog
mailing list