提交 af94b0e7 编写于 作者: B bbcallen

ff_ffplay: merge ffplay 2d059d8de1b4904c3a56ac99dc0badb870a50941

上级 fcd45c3a
...@@ -238,6 +238,15 @@ static int packet_queue_get_or_buffering(FFPlayer *ffp, PacketQueue *q, AVPacket ...@@ -238,6 +238,15 @@ static int packet_queue_get_or_buffering(FFPlayer *ffp, PacketQueue *q, AVPacket
// FFP_MERGE: YUVA_OUT // FFP_MERGE: YUVA_OUT
// FFP_MERGE: BPP // FFP_MERGE: BPP
// FFP_MERGE: blend_subrect // FFP_MERGE: blend_subrect
static void free_picture(VideoPicture *vp)
{
if (vp->bmp) {
SDL_VoutFreeYUVOverlay(vp->bmp);
vp->bmp = NULL;
}
}
// FFP_MERGE: free_subpicture // FFP_MERGE: free_subpicture
// FFP_MERGE: calculate_display_rect // FFP_MERGE: calculate_display_rect
// FFP_MERGE: video_image_display // FFP_MERGE: video_image_display
...@@ -275,7 +284,6 @@ static void video_image_display2(FFPlayer *ffp) ...@@ -275,7 +284,6 @@ static void video_image_display2(FFPlayer *ffp)
static void stream_close(FFPlayer *ffp) static void stream_close(FFPlayer *ffp)
{ {
VideoState *is = ffp->is; VideoState *is = ffp->is;
VideoPicture *vp;
int i; int i;
/* XXX: use a special url_shutdown call to abort parse cleanly */ /* XXX: use a special url_shutdown call to abort parse cleanly */
is->abort_request = 1; is->abort_request = 1;
...@@ -293,16 +301,8 @@ static void stream_close(FFPlayer *ffp) ...@@ -293,16 +301,8 @@ static void stream_close(FFPlayer *ffp)
#endif #endif
/* free all pictures */ /* free all pictures */
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) { for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++)
vp = &is->pictq[i]; free_picture(&is->pictq[i]);
#if CONFIG_AVFILTER
avfilter_unref_bufferp(&vp->picref);
#endif
if (vp->bmp) {
SDL_VoutFreeYUVOverlay(vp->bmp);
vp->bmp = NULL;
}
}
#ifdef FFP_MERGE #ifdef FFP_MERGE
for (i = 0; i < SUBPICTURE_QUEUE_SIZE; i++) for (i = 0; i < SUBPICTURE_QUEUE_SIZE; i++)
free_subpicture(&is->subpq[i]); free_subpicture(&is->subpq[i]);
...@@ -751,8 +751,7 @@ static void alloc_picture(FFPlayer *ffp) ...@@ -751,8 +751,7 @@ static void alloc_picture(FFPlayer *ffp)
vp = &is->pictq[is->pictq_windex]; vp = &is->pictq[is->pictq_windex];
if (vp->bmp) free_picture(vp);
SDL_VoutFreeYUVOverlay(vp->bmp);
#ifdef FFP_MERGE #ifdef FFP_MERGE
video_open(ffp, 0, vp); video_open(ffp, 0, vp);
...@@ -774,11 +773,7 @@ static void alloc_picture(FFPlayer *ffp) ...@@ -774,11 +773,7 @@ static void alloc_picture(FFPlayer *ffp)
"Error: the video system does not support an image\n" "Error: the video system does not support an image\n"
"size of %dx%d pixels. Try using -lowres or -vf \"scale=w:h\"\n" "size of %dx%d pixels. Try using -lowres or -vf \"scale=w:h\"\n"
"to reduce the image size.\n", vp->width, vp->height ); "to reduce the image size.\n", vp->width, vp->height );
if (vp->bmp) free_picture(vp);
{
SDL_VoutFreeYUVOverlay(vp->bmp);
vp->bmp = NULL;
}
} }
SDL_LockMutex(is->pictq_mutex); SDL_LockMutex(is->pictq_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册