[FFmpeg-devel] Contract offer for implementing decoding functionality for interlaced AVCHD (5000 Euro + optional 1000 Euro Bonus)

Reimar Döffinger Reimar.Doeffinger
Sun Jun 8 20:29:29 CEST 2008

On Sat, Jun 07, 2008 at 06:54:32PM +0200, Reimar D?ffinger wrote:
> > What is needed to fix this is likely what robert marstons SOC2008 attempted
> > as qualification task.
> > See the ML, H.222 and H.264
> I'll see if I can find time for it (I have not even looked at it yet)...

Hmm... I wasn't able to find it, can you hint me better where to look?
Btw. (and I think this was noticed by someone else before), just disabling the
timestamp discontinuity checks "fixes" it, the problem I think is that
pts is AV_NOPTS_VALUE for one of the fields (i.e. for every second
I attached the quick hack I used to test.

Reimar D?ffinger

P.S.: Just to make it clear, I'd be happy if someone else started
looking into this and fixing it, I am not keen on it at all...
-------------- next part --------------
diff --git a/ffmpeg.c b/ffmpeg.c
index 2885ee4..936ad84 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2033,7 +2033,7 @@ static int av_encode(AVFormatContext **output_files,
         if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE) {
             int64_t pkt_dts= av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q);
             int64_t delta= pkt_dts - ist->next_pts;
-            if((FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE || pkt_dts+1<ist->pts)&& !copy_ts){
+            if((FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE || pkt_dts+1<ist->pts)&& !copy_ts && 0){
                 input_files_ts_offset[ist->file_index]-= delta;
                 if (verbose > 2)
                     fprintf(stderr, "timestamp discontinuity %"PRId64", new offset= %"PRId64"\n", delta, input_files_ts_offset[ist->file_index]);

More information about the ffmpeg-devel mailing list