aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-04 00:32:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-04 00:32:31 +0200
commit86e107a7d468666189506d3edd4f4b5ca14cd59e (patch)
tree7270750bbe78c241461a844d7c1c8de3696e3765 /ffplay.c
parentaf392efe51d5cc3536cb3c75bce8954179222d18 (diff)
parent1a068bfefd5da09f596e5079b39b418933bad0ea (diff)
downloadffmpeg-86e107a7d468666189506d3edd4f4b5ca14cd59e.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: cosmetics: Consistently use C-style comments with multiple inclusion guards anm: fix a few Doxygen comments misc typo and wording fixes attributes: add av_noreturn attributes: drop pointless define guards configure: do not disable av_always_inline with --enable-small flvdec: initial stream switch support avplay: fix write on freed memory for rawvideo snow: remove a VLA used for edge emulation x86: lavfi: fix gradfun/yadif build with mmx/sse disabled snow: remove the runs[] VLA. snow: Check mallocs at init flacdec: remove redundant setting of avctx->sample_fmt Conflicts: ffplay.c libavcodec/h264.c libavcodec/snow.c libavcodec/snow.h libavcodec/snowdec.c libavcodec/snowenc.c libavformat/flvdec.c libavutil/attributes.h tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ffplay.c b/ffplay.c
index a879471bbe..6668007fd6 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1632,6 +1632,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
static int video_thread(void *arg)
{
+ AVPacket pkt = { 0 };
VideoState *is = arg;
AVFrame *frame = avcodec_alloc_frame();
int64_t pts_int = AV_NOPTS_VALUE, pos = -1;
@@ -1655,7 +1656,6 @@ static int video_thread(void *arg)
#endif
for (;;) {
- AVPacket pkt;
#if CONFIG_AVFILTER
AVFilterBufferRef *picref;
AVRational tb;
@@ -1664,14 +1664,14 @@ static int video_thread(void *arg)
SDL_Delay(10);
avcodec_get_frame_defaults(frame);
+ av_free_packet(&pkt);
+
ret = get_video_frame(is, frame, &pts_int, &pkt);
if (ret < 0)
goto the_end;
- if (!ret) {
- av_free_packet(&pkt);
+ if (!ret)
continue;
- }
#if CONFIG_AVFILTER
if ( last_w != is->video_st->codec->width
@@ -1766,6 +1766,7 @@ static int video_thread(void *arg)
av_freep(&vfilters);
avfilter_graph_free(&graph);
#endif
+ av_free_packet(&pkt);
av_free(frame);
return 0;
}