summaryrefslogtreecommitdiff
path: root/wcap
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2014-01-15 08:52:07 -0800
committerKristian Høgsberg <krh@bitplanet.net>2014-01-19 21:59:37 -0800
commitf05645b30e5feaaeb785cdb006ab6122c4127358 (patch)
tree2b10a1f872ad40d93368b455165169fecd81f5fc /wcap
parent1db007202b1bdd86c19f458dc97105b9ed258cb8 (diff)
downloadweston-f05645b30e5feaaeb785cdb006ab6122c4127358.tar.gz
wcap-decode: remove dead code
Avoids leaking memory we never use. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'wcap')
-rw-r--r--wcap/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/wcap/main.c b/wcap/main.c
index 1e4605ae..29bb9c30 100644
--- a/wcap/main.c
+++ b/wcap/main.c
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
int num = 30, denom = 1;
char filename[200];
char *mode;
- uint32_t msecs, frame_time, *frame, frame_size;
+ uint32_t msecs, frame_time;
for (i = 1, j = 1; i < argc; i++) {
if (strcmp(argv[i], "--yuv4mpeg2-444") == 0) {
@@ -276,11 +276,7 @@ int main(int argc, char *argv[])
has_frame = wcap_decoder_get_frame(decoder);
msecs = decoder->msecs;
frame_time = 1000 * denom / num;
- frame_size = decoder->width * decoder->height * 4;
- frame = malloc(frame_size);
while (has_frame) {
- if (decoder->msecs >= msecs)
- memcpy(frame, decoder->frame, frame_size);
if (all || i == output_frame) {
snprintf(filename, sizeof filename,
"wcap-frame-%d.png", i);