Quoting Vittorio Giovara (2015-06-30 15:50:25)
> ---
> libavcodec/flashsvenc.c | 2 +-
> libavcodec/qtrleenc.c | 5 ++---
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
> index 971ce1b..1c87ae3 100644
> --- a/libavcodec/flashsvenc.c
> +++ b/libavcodec/flashsvenc.c
> @@ -275,7 +275,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx,
> AVPacket *pkt,
> avctx->coded_frame->key_frame = 0;
> }
>
> - if (avctx->coded_frame->key_frame)
> + if (I_frame)
> pkt->flags |= AV_PKT_FLAG_KEY;
> *got_packet = 1;
>
> diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
> index 91dbb8b..90c2c50 100644
> --- a/libavcodec/qtrleenc.c
> +++ b/libavcodec/qtrleenc.c
> @@ -304,7 +304,6 @@ static int qtrle_encode_frame(AVCodecContext *avctx,
> AVPacket *pkt,
> const AVFrame *pict, int *got_packet)
> {
> QtrleEncContext * const s = avctx->priv_data;
> - AVFrame * const p = avctx->coded_frame;
> int ret;
>
> if ((ret = ff_alloc_packet(pkt, s->max_buf_size)) < 0) {
> @@ -315,11 +314,11 @@ static int qtrle_encode_frame(AVCodecContext *avctx,
> AVPacket *pkt,
>
> if (avctx->gop_size == 0 || (s->avctx->frame_number % avctx->gop_size)
> == 0) {
> /* I-Frame */
> - p->pict_type = AV_PICTURE_TYPE_I;
> + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
> s->key_frame = 1;
> } else {
> /* P-Frame */
> - p->pict_type = AV_PICTURE_TYPE_P;
> + avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
> s->key_frame = 0;
> }
>
Wrong patch.
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel