Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-17 15:41:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-11-17 15:41:42 +0400
commitf4f7888bab7061f08c54356c285adaba24383dc0 (patch)
treecc1b39e0754ac80908cf929f71e5127b83174c48 /libavcodec/libschroedingerenc.c
parenta0c0629dd963b00f989172f0c599353b6b288c37 (diff)
parentffe04c330335add4c6d70ab0bb98e6b3f4f7abfa (diff)
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 43530e8536..f3455df1f3 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;
}