Changes between Version 1 and Version 2 of Ticket #2873, comment 3


Ignore:
Timestamp:
Aug 21, 2013, 3:02:13 AM (6 years ago)
Author:
kadmandux
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2873, comment 3

    v1 v2  
    44
    55{{{
     6int av_compare_streams(const void *st1, const void *st2)
     7{
     8        return ((((AVStream *)st1)->id > ((AVStream *)st2)->id) ? 1 :
     9                        (((AVStream *)st1)->id < ((AVStream *)st2)->id) ? -1 : 0);
     10}
     11
    612void av_sort_streams_by_id(AVFormatContext *s)
    713        qsort((void *)s->streams, s->nb_streams, sizeof(s->streams[0]), av_compare_streams);
     
    1218}
    1319
    14 int av_compare_streams(const void *st1, const void *st2)
    15 {
    16         return ((((AVStream *)st1)->id > ((AVStream *)st2)->id) ? 1 :
    17                         (((AVStream *)st1)->id < ((AVStream *)st2)->id) ? -1 : 0;
    18 }
    1920
    2021}}}
    2122
    22 2.- Add the prototype of first function to "avformat.h"
     232.- Add the prototypes to "avformat.h"
    2324
    2425{{{
    2526void av_sort_streams_by_id(AVFormatContext *s);
     27int av_compare_streams(const void *st1, const void *st2);
    2628}}}
    2729
     
    3840}}}
    3941
    40 This code should be executed before the call to "avformat_find_stream_info".
     42This code should be executed after the call to "avformat_find_stream_info".
    4143
    42444.- Do the equivalent change in ffmpeg_opt.c, also inside "open_input_file" function.