| 
																	
																	
																		
																	
																	
																 | 
																@@ -3652,15 +3652,15 @@ static int mov_write_sidx_tag(AVIOContext *pb, | 
															
														
														
													
														
															
																 | 
																 | 
																        duration = track->start_dts + track->track_duration - | 
																 | 
																 | 
																        duration = track->start_dts + track->track_duration - | 
															
														
														
													
														
															
																 | 
																 | 
																                   track->cluster[0].dts; | 
																 | 
																 | 
																                   track->cluster[0].dts; | 
															
														
														
													
														
															
																 | 
																 | 
																        starts_with_SAP = track->cluster[0].flags & MOV_SYNC_SAMPLE; | 
																 | 
																 | 
																        starts_with_SAP = track->cluster[0].flags & MOV_SYNC_SAMPLE; | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        // pts<0 should be cut away using edts | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        if (presentation_time < 0) | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																            presentation_time = 0; | 
															
														
														
													
														
															
																 | 
																 | 
																    } else { | 
																 | 
																 | 
																    } else { | 
															
														
														
													
														
															
																 | 
																 | 
																        entries = track->nb_frag_info; | 
																 | 
																 | 
																        entries = track->nb_frag_info; | 
															
														
														
													
														
															
																 | 
																 | 
																        presentation_time = track->frag_info[0].time; | 
																 | 
																 | 
																        presentation_time = track->frag_info[0].time; | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    // pts<0 should be cut away using edts | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    if (presentation_time < 0) | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																        presentation_time = 0; | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																    avio_wb32(pb, 0); /* size */ | 
																 | 
																 | 
																    avio_wb32(pb, 0); /* size */ | 
															
														
														
													
														
															
																 | 
																 | 
																    ffio_wfourcc(pb, "sidx"); | 
																 | 
																 | 
																    ffio_wfourcc(pb, "sidx"); | 
															
														
														
													
														
															
																 | 
																 | 
																    avio_w8(pb, 1); /* version */ | 
																 | 
																 | 
																    avio_w8(pb, 1); /* version */ | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |