Commit 92147b6b authored by Zdenek Kabelac's avatar Zdenek Kabelac Committed by Diego Biurrun

Use new packet reading API, fixes a memory leak.

patch by Zdenek Kabelac, zdenek.kabelac gmail com

Originally committed as revision 18728 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2e032b32
...@@ -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