[Ffmpeg-devel] Bug? Subtitles not detected in vob

Wolfram Gloger wmglo
Mon Jan 8 21:27:58 CET 2007


Hi,

> I painfully (yeah...) managed to compile this version, and finally
> succeeded...
> 
> result:
> 
> Input #0, mpeg, from '/var/tv/test.vob':
>   Duration: 00:38:59.8, start: 0.060000, bitrate: 18533 kb/s
>   Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 8700 kb/s,
> 25.00 fps(r)
>   Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
>   Stream #0.2[0x81]: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
> Must supply at least one output file

Arghh, I'm really sorry.  I couldn't believe that to be "fixed"
by one of my patches, but it is!  To make up for it, I
painfully managed to isolate which one, and it is the appended
one, which I have in my tree for years.

Sorry again for the false data!

I am therefore re-proposing the appended patch after some years have
passed :-).

Regards,
Wolfram.

--- trunk/libavformat/utils.c	2007-01-07 15:03:24.000000000 +0100
+++ ffmpeg-wg/libavformat/utils.c	2007-01-07 15:04:08.000000000 +0100
@@ -1564,6 +1625,7 @@
     int read_size, i, ret;
     int64_t end_time;
     int64_t filesize, offset, duration;
+    offset_t old_offset;
 
     /* free previous packet */
     if (ic->cur_st && ic->cur_st->parser)
@@ -1583,7 +1645,7 @@
 
     /* we read the first packets to get the first PTS (not fully
        accurate, but it is enough now) */
-    url_fseek(&ic->pb, 0, SEEK_SET);
+    old_offset = url_fseek(&ic->pb, 0, SEEK_CUR);
     read_size = 0;
     for(;;) {
         if (read_size >= DURATION_MAX_READ_SIZE)
@@ -1649,7 +1711,7 @@
 
     fill_all_stream_timings(ic);
 
-    url_fseek(&ic->pb, 0, SEEK_SET);
+    url_fseek(&ic->pb, old_offset, SEEK_SET);
 }
 
 static void av_estimate_timings(AVFormatContext *ic)





More information about the ffmpeg-devel mailing list