Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#4039 closed defect (fixed)

HTTP error-responses don't result in error code being returned by top level code

Reported by: quandt Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: http
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When issuing calls like this:

#!/bin/bash
ffmpeg -i http://somehost/somecontent.type someout.mkv
result=$?

If the connection is lost or something wonky happens out on the server, while the code detects the error and stops processing, there is no error code propogated on exit, ie result in the above will always = 0 (no error).

Simple way to replicate this is to issue "service apache2 restart" on a server you have access to where you are pulling the source from.

Attachments (1)

ffmpeg-20141016-191035.log (228.2 KB ) - added by quandt 10 years ago.

Download all attachments as: .zip

Change History (5)

by quandt, 10 years ago

Attachment: ffmpeg-20141016-191035.log added

comment:1 by Michael Niedermayer, 9 years ago

Resolution: invalid
Status: newclosed

this requires "-xerror 1"
if thats not sufficient then its a bug in the specific demuxer which fails to return an error code
please open or reopen the ticket if xerror doesnt help, and provide information about the format that failed

comment:2 by Michael Niedermayer, 9 years ago

Resolution: invalid
Status: closedreopened

there was a bug in http.c, ill post a fix to the ML in a moment
"-xerror 1" is still needed of course though

comment:3 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: reopenedclosed

comment:4 by Carl Eugen Hoyos, 9 years ago

Keywords: exit code removed
Note: See TracTickets for help on using tickets.