[haiku-commits] Re: haiku: hrev52240 - src/add-ons/media/plugins/ffmpeg

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 16 Aug 2018 11:25:56 -0400

On Thu, Aug 16, 2018 at 11:22 AM Stefano Ceccherini
<stefano.ceccherini@xxxxxxxxx> wrote:

        fPacket.stream_index = fFormatContext->nb_streams;
        fStream = avformat_new_stream(fFormatContext, NULL);
-       fStream->id = fPacket.stream_index;

        if (fStream == NULL) {
                TRACE("  failed to add new stream\n");
                return B_ERROR;
        }


Just out of curiosity, can avformat_new_stream() fail for any other
reason than memory allocation? If not, it'd be nice to return
something more specific/informative here such as B_NO_MEMORY.

Regards,

Rene

Other related posts: