summaryrefslogtreecommitdiff
path: root/src/libxinevdec/yuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec/yuv.c')
-rw-r--r--src/libxinevdec/yuv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index fea2ca4af..b9856379a 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -104,10 +104,8 @@ static void yuv_decode_data (video_decoder_t *this_gen,
this->progressive = buf->decoder_info[3];
this->top_field_first = buf->decoder_info[4];
- if (this->buf) {
- free (this->buf);
- this->buf = NULL;
- }
+ free (this->buf);
+ this->buf = NULL;
this->bufsize = VIDEOBUFSIZE;
this->buf = malloc(this->bufsize);
@@ -304,10 +302,7 @@ static void yuv_discontinuity (video_decoder_t *this_gen) {
static void yuv_dispose (video_decoder_t *this_gen) {
yuv_decoder_t *this = (yuv_decoder_t *) this_gen;
- if (this->buf) {
- free (this->buf);
- this->buf = NULL;
- }
+ free (this->buf);
if (this->decoder_ok) {
this->decoder_ok = 0;