summaryrefslogtreecommitdiffstats
path: root/libavcodec/libschroedingerenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-17 12:41:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-17 12:41:42 +0100
commitf4f7888bab7061f08c54356c285adaba24383dc0 (patch)
treecc1b39e0754ac80908cf929f71e5127b83174c48 /libavcodec/libschroedingerenc.c
parenta0c0629dd963b00f989172f0c599353b6b288c37 (diff)
parentffe04c330335add4c6d70ab0bb98e6b3f4f7abfa (diff)
downloadffmpeg-streaming-f4f7888bab7061f08c54356c285adaba24383dc0.zip
ffmpeg-streaming-f4f7888bab7061f08c54356c285adaba24383dc0.tar.gz
Merge commit 'ffe04c330335add4c6d70ab0bb98e6b3f4f7abfa'
* commit 'ffe04c330335add4c6d70ab0bb98e6b3f4f7abfa': libxvid: use the AVFrame API properly. pcxenc: use the AVFrame API properly. roqvideo: remove unused variables libschroedingerenc: use the AVFrame API properly. Conflicts: libavcodec/pcxenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libschroedingerenc.c')
-rw-r--r--libavcodec/libschroedingerenc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 43530e8..f3455df 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -47,9 +47,6 @@ typedef struct SchroEncoderParams {
/** Schroedinger frame format */
SchroFrameFormat frame_format;
- /** frame being encoded */
- AVFrame picture;
-
/** frame size */
int frame_size;
@@ -162,7 +159,9 @@ static av_cold int libschroedinger_encode_init(AVCodecContext *avctx)
avctx->width,
avctx->height);
- avctx->coded_frame = &p_schro_params->picture;
+ avctx->coded_frame = av_frame_alloc();
+ if (!avctx->coded_frame)
+ return AVERROR(ENOMEM);
if (!avctx->gop_size) {
schro_encoder_setting_set_double(p_schro_params->encoder,
@@ -427,6 +426,8 @@ static int libschroedinger_encode_close(AVCodecContext *avctx)
/* Free the video format structure. */
av_freep(&p_schro_params->format);
+ av_frame_free(&avctx->coded_frame);
+
return 0;
}
OpenPOWER on IntegriCloud