Menu

#1 mpegjoin utility contains bugs when file can not be open

closed
nobody
None
5
2000-12-19
2000-09-29
No

mpegjoin utility contains bugs when file can not be open
I hope my patch is resolve this problem:
--- mpegjoin.old Fri Sep 29 13:30:34 2000
+++ mpegjoin.c Fri Sep 29 13:32:36 2000
@@ -81,9 +81,9 @@
}

n = open \(argv\[1\], OUTPUT\_ACCESS, OUTPUT\_PERMS\);

- if (n == 0)
+ if (n == -1)
{
- fprintf (stderr, "%s: can't open output stream '%s'\n", argv[0], argv[3]);
+ fprintf (stderr, "%s: can't open output stream '%s'\n", argv[0], argv[1]);
exit (-1);
}

@@ -91,7 +91,7 @@
while (arg < argc)
{
s = open (argv[arg], INPUT_ACCESS);
- if (s == 0)
+ if (s == -1)
{
fprintf (stderr, "%s: can't open input stream '%s'\n", argv[0], argv[arg]);
exit (-1);

Discussion

  • Andrew Stevens

    Andrew Stevens - 2000-12-19

    AS: I'll probably get rid of mpegjoin - its basically a broken idea as all the timestamps and buffer management are guaranteed to be screwed.

    I think its already deleted in the CVS.

     
  • Andrew Stevens

    Andrew Stevens - 2000-12-19
    • status: open --> closed
     

Log in to post a comment.

Auth0 Logo