[FFmpeg-trac] #131(avformat:open): add support for (maybe broken) *.divx file

FFmpeg trac at avcodec.org
Sat Apr 30 12:46:25 CEST 2011


#131: add support for (maybe broken)  *.divx file
------------------------+-----------------------
Reporter:  ami_stuff    |       Owner:
    Type:  enhancement  |      Status:  open
Priority:  normal       |   Component:  avformat
 Version:  git-master   |  Resolution:
Keywords:               |  Blocked By:
Blocking:               |  Reproduced:  1
Analyzed:  0            |
------------------------+-----------------------

Comment (by reimar):

 Do you have any other info on the file? Patch below allows playback, but
 the subtitle format is not xsub it seems, any idea what it might be??
 diff --git a/libavformat/avidec.c b/libavformat/avidec.c
 index 9395dc2..af8b023 100644
 --- a/libavformat/avidec.c
 +++ b/libavformat/avidec.c
 @@ -532,6 +532,8 @@ static int avi_read_header(AVFormatContext *s,
 AVFormatParameters *ap)
              case MKTAG('a', 'u', 'd', 's'):
                  codec_type = AVMEDIA_TYPE_AUDIO;
                  break;
 +            case MKTAG('s', 'u', 'b', 's'):
 +                st->codec->codec_id = CODEC_ID_XSUB;
              case MKTAG('t', 'x', 't', 's'):
                  codec_type = AVMEDIA_TYPE_SUBTITLE;
                  break;
 @@ -656,7 +658,8 @@ static int avi_read_header(AVFormatContext *s,
 AVFormatParameters *ap)
                      break;
                  case AVMEDIA_TYPE_SUBTITLE:
                      st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
 -                    st->request_probe= 1;
 +                    if (st->codec->codec_id == CODEC_ID_NONE)
 +                        st->request_probe= 1;
                      break;
                  default:
                      st->codec->codec_type = AVMEDIA_TYPE_DATA;

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/131#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list