[FFmpeg-trac] #2873(avformat:open): ffmpeg concat demuxer fails: mpeg files with different audio and video stream order
FFmpeg
trac at avcodec.org
Wed Aug 21 22:05:43 CEST 2013
#2873: ffmpeg concat demuxer fails: mpeg files with different audio and video
stream order
-------------------------------------+-------------------------------------
Reporter: kadmandux | Owner:
Type: enhancement | Status: open
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: concat | Blocked By:
demuxer | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by kadmandux):
It works now!
There were two problems:
1) The function av_compare_streams had an error. It was expecting pointers
to streams and it gets passed pointers to pointers to streams (we are
sorting an array with pointers, not an array with streams). So, this is
the correct code:
{{{
int av_compare_streams(const void *st1, const void *st2)
{
return (((*(AVStream **)st1)->id > (*(AVStream **)st2)->id) ? 1 :
((*(AVStream **)st1)->id < (*(AVStream
**)st2)->id) ? -1 : 0);
}}}
2) The funcion avformat_find_stream_info was invoked from more places than
I fixed, so Iva made the changes at the end of funcion
avformat_find_stream_info
And now it works great!
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2873#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list