am7xxx-play: fix a possible case of use before initialization
[libam7xxx.git] / examples / am7xxx-play.c
index 2fa615a..5b2887d 100644 (file)
@@ -354,6 +354,7 @@ static int am7xxx_play(const char *input_format_string,
                goto cleanup_out_buf;
        }
 
                goto cleanup_out_buf;
        }
 
+       got_packet = 0;
        while (run) {
                /* read packet */
                ret = av_read_frame(input_ctx.format_ctx, &in_packet);
        while (run) {
                /* read packet */
                ret = av_read_frame(input_ctx.format_ctx, &in_packet);