Ticket #7849: t7849_mythtv_avi_seektable_fix.diff
File t7849_mythtv_avi_seektable_fix.diff, 1.3 KB (added by , 14 years ago) |
---|
-
programs/mythtranscode/mpeg2fix.cpp
732 732 if (type) 733 733 fmt = av_find_input_format(type); 734 734 735 avifile = (strcmp(fmt->name, "avi")) ? 1 : 0; 736 735 737 // Open recording 736 738 VERBOSE(MPF_GENERAL, QString("Opening %1").arg(inputfile)); 737 739 … … 2570 2572 2571 2573 AVPacket pkt; 2572 2574 int count = 0; 2575 int prevpos = 0; 2573 2576 2574 2577 /*============ initialise AV ===============*/ 2575 2578 QByteArray fname = file.toLocal8Bit(); … … 2583 2586 if (pkt.stream_index == vid_id) 2584 2587 { 2585 2588 if (pkt.flags & PKT_FLAG_KEY) 2586 posMap[count] = pkt.pos;2589 posMap[count] = avifile ? prevpos + 1 : pkt.pos; 2587 2590 count++; 2588 2591 } 2592 prevpos = pkt.pos; 2593 2589 2594 av_free_packet(&pkt); 2590 2595 } 2591 2596 -
programs/mythtranscode/mpeg2fix.h
244 244 int aud_stream_count; 245 245 int64_t ptsIncrement; 246 246 int64_t ptsOffset; //was initPTS 247 bool avifile; 247 248 248 249 int discard; 249 250 //control options