Revision d39facc7 tools/pktdumper.c

View differences:

tools/pktdumper.c
104 104
        //printf("open(\"%s\")\n", pktfilename);
105 105
        if (!nowrite) {
106 106
            fd = open(pktfilename, O_WRONLY|O_CREAT, 0644);
107
            write(fd, pkt.data, pkt.size);
107
            err = write(fd, pkt.data, pkt.size);
108
            if (err < 0) {
109
                fprintf(stderr, "write: error %d\n", err);
110
                return 1;
111
            }
108 112
            close(fd);
109 113
        }
110 114
        av_free_packet(&pkt);

Also available in: Unified diff