|
|
|
@@ -1235,10 +1235,7 @@ static void stream_close(VideoState *is) |
|
|
|
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { |
|
|
|
vp = &is->pictq[i]; |
|
|
|
#if CONFIG_AVFILTER |
|
|
|
if (vp->picref) { |
|
|
|
avfilter_unref_buffer(vp->picref); |
|
|
|
vp->picref = NULL; |
|
|
|
} |
|
|
|
avfilter_unref_bufferp(&vp->picref); |
|
|
|
#endif |
|
|
|
if (vp->bmp) { |
|
|
|
SDL_FreeYUVOverlay(vp->bmp); |
|
|
|
@@ -1287,9 +1284,7 @@ static void alloc_picture(void *opaque) |
|
|
|
SDL_FreeYUVOverlay(vp->bmp); |
|
|
|
|
|
|
|
#if CONFIG_AVFILTER |
|
|
|
if (vp->picref) |
|
|
|
avfilter_unref_buffer(vp->picref); |
|
|
|
vp->picref = NULL; |
|
|
|
avfilter_unref_bufferp(&vp->picref); |
|
|
|
|
|
|
|
vp->width = is->out_video_filter->inputs[0]->w; |
|
|
|
vp->height = is->out_video_filter->inputs[0]->h; |
|
|
|
@@ -1382,8 +1377,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t |
|
|
|
if (vp->bmp) { |
|
|
|
AVPicture pict = { { 0 } }; |
|
|
|
#if CONFIG_AVFILTER |
|
|
|
if (vp->picref) |
|
|
|
avfilter_unref_buffer(vp->picref); |
|
|
|
avfilter_unref_bufferp(&vp->picref); |
|
|
|
vp->picref = src_frame->opaque; |
|
|
|
#endif |
|
|
|
|
|
|
|
|