add ids to auto/labels, fix awdw gui deadlock, fix fourier bfr bug, fix cache critica...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / ffmpeg.C
index b3915cfc44de133644e71180239b519170199d2d..c08a01db57d0431977e98c4ddd35913e413be33d 100644 (file)
@@ -3961,6 +3961,9 @@ double FFMPEG::get_initial_timecode(int data_type, int channel, double frame_rat
                fidx = aud->fidx;
                nudge = aud->nudge;
                st = aud->st;
+               AVDictionaryEntry *tref = av_dict_get(fmt_ctx->metadata, "time_reference", 0, 0);
+               if( tref && aud && aud->sample_rate )
+                       return strtod(tref->value, 0) / aud->sample_rate;
                break; }
        case TRACK_VIDEO: {
                codec_type = AVMEDIA_TYPE_VIDEO;