Advertisement
jyavenard

Untitled

Dec 11th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
  2. index 257ff03..32b38e0 100644
  3. --- a/mythtv/libs/libmythtv/avformatdecoder.cpp
  4. +++ b/mythtv/libs/libmythtv/avformatdecoder.cpp
  5. @@ -974,9 +974,15 @@ int AvFormatDecoder::OpenFile(RingBuffer *rbuffer, bool novideo,
  6.  
  7. if (!livetv && !ringBuffer->IsDisc())
  8. {
  9. + if ((ic->duration == (int64_t)AV_NOPTS_VALUE) &&
  10. + (!livetv && !ringBuffer->IsDisc()))
  11. + av_estimate_timings(ic, 0);
  12. // generate timings based on the video stream to avoid bogus ffmpeg
  13. // values for duration and bitrate
  14. av_update_stream_timings_video(ic);
  15. + if ((ic->duration == (int64_t)AV_NOPTS_VALUE) &&
  16. + (!livetv && !ringBuffer->IsDisc()))
  17. + av_estimate_timings(ic, 0);
  18. }
  19.  
  20. // Scan for the initial A/V streams
  21. @@ -1025,10 +1031,6 @@ int AvFormatDecoder::OpenFile(RingBuffer *rbuffer, bool novideo,
  22.  
  23. if (dur == 0)
  24. {
  25. - if ((ic->duration == (int64_t)AV_NOPTS_VALUE) &&
  26. - (!livetv && !ringBuffer->IsDisc()))
  27. - av_estimate_timings(ic, 0);
  28. -
  29. dur = ic->duration / (int64_t)AV_TIME_BASE;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement