/* the picture is allocated by the decoder. no need to
free it */
- snprintf(buf, sizeof(buf), filename, dec_ctx->frame_number);
+ snprintf(buf, sizeof(buf), "%s-%d", filename, dec_ctx->frame_number);
pgm_save(frame->data[0], frame->linesize[0],
frame->width, frame->height, buf);
}