mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
Merge remote branch 'qatar/master'
12 files changed, 36 insertions(+), 81 deletions(-) yes thats 36 new lines in 14 commits * qatar/master: ffmpeg: fix -aspect cli option Restructure video filter implementation in ffmpeg.c. ffplay: remove audio_write_get_buf_size() forward declaration lavfi: print key-frame and picture type information in ff_dlog_ref() mathops: remove ancient confusing comment cws2fws: Improve error message wording. tools: Check the return value of write(). mpegaudio: move OUT_FMT macro to mpegaudiodec.c mpegaudio: remove OUT_MIN/MAX macros Add missing #includes to mp3_header_(de)compress bsf dct: fix indentation dct: bypass table allocation for DCT_II of size 32 h264dsp_mmx: Add #ifdefs around some mmxext functions on x86_64. Remove unused header mpegaudio3.h. Conflicts: ffmpeg.c libavcodec/mpegaudio.h libavcodec/mpegaudio3.h libavfilter/avfilter.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -35,14 +35,14 @@ int main(int argc, char *argv[])
|
||||
fd_in = open(argv[1], O_RDONLY);
|
||||
if (fd_in < 0)
|
||||
{
|
||||
perror("Error while opening: ");
|
||||
perror("Error opening input file");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fd_out = open(argv[2], O_WRONLY|O_CREAT, 00644);
|
||||
if (fd_out < 0)
|
||||
{
|
||||
perror("Error while opening: ");
|
||||
perror("Error opening output file");
|
||||
close(fd_in);
|
||||
exit(1);
|
||||
}
|
||||
@ -69,7 +69,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
// write out modified header
|
||||
buf_in[0] = 'F';
|
||||
write(fd_out, &buf_in, 8);
|
||||
if (write(fd_out, &buf_in, 8) < 8) {
|
||||
perror("Error writing output file");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
zstream.zalloc = NULL;
|
||||
zstream.zfree = NULL;
|
||||
@ -101,7 +104,10 @@ int main(int argc, char *argv[])
|
||||
zstream.avail_in, zstream.total_in, zstream.avail_out, zstream.total_out,
|
||||
zstream.total_out-last_out);
|
||||
|
||||
write(fd_out, &buf_out, zstream.total_out-last_out);
|
||||
if (write(fd_out, &buf_out, zstream.total_out - last_out) < zstream.total_out - last_out) {
|
||||
perror("Error writing output file");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
i += len;
|
||||
|
||||
@ -120,7 +126,10 @@ int main(int argc, char *argv[])
|
||||
buf_in[3] = ((zstream.total_out+8) >> 24) & 0xff;
|
||||
|
||||
lseek(fd_out, 4, SEEK_SET);
|
||||
write(fd_out, &buf_in, 4);
|
||||
if (write(fd_out, &buf_in, 4) < 4) {
|
||||
perror("Error writing output file");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
inflateEnd(&zstream);
|
||||
|
@ -104,7 +104,11 @@ int main(int argc, char **argv)
|
||||
//printf("open(\"%s\")\n", pktfilename);
|
||||
if (!nowrite) {
|
||||
fd = open(pktfilename, O_WRONLY|O_CREAT, 0644);
|
||||
write(fd, pkt.data, pkt.size);
|
||||
err = write(fd, pkt.data, pkt.size);
|
||||
if (err < 0) {
|
||||
fprintf(stderr, "write: error %d\n", err);
|
||||
return 1;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
av_free_packet(&pkt);
|
||||
|
Reference in New Issue
Block a user