Commit 3c3f8316 authored by diego's avatar diego

Use new packet reading API, fixes a memory leak.

patch by Zdenek Kabelac, zdenek.kabelac gmail com


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18728 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 564354ce
...@@ -107,11 +107,14 @@ int main(int argc, char **argv) ...@@ -107,11 +107,14 @@ int main(int argc, char **argv)
write(fd, pkt.data, pkt.size); write(fd, pkt.data, pkt.size);
close(fd); close(fd);
} }
av_free_packet(&pkt);
pktnum++; pktnum++;
if (maxpkts && (pktnum >= maxpkts)) if (maxpkts && (pktnum >= maxpkts))
break; break;
} }
av_close_input_file(fctx);
while (donotquit) while (donotquit)
sleep(60); sleep(60);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment