Opened 4 years ago

Closed 4 years ago

Last modified 4 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 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by quandt

comment:1 Changed 4 years ago by michael

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 4 years ago by michael

  • Resolution invalid deleted
  • Status changed from closed to reopened

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 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:4 Changed 4 years ago by cehoyos

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