Ticket #2077: mythtransode-ac3.diff
File mythtransode-ac3.diff, 3.1 KB (added by , 11 years ago) |
---|
-
external/FFmpeg/libavcodec/
old new 93 93 avctx->channels = s->channels; 94 94 avctx->channel_layout = s->channel_layout; 95 95 } 96 avctx->frame_size = s->samples; 96 97 s1->duration = s->samples; 97 98 avctx->audio_service_type = s->service_type; 98 99 } -
programs/mythtranscode/mpeg2fix.cpp
470 470 471 471 int MPEG2replex::WaitBuffers() 472 472 { 473 pthread_mutex_lock( &mutex);473 pthread_mutex_lock(&mutex); 474 474 while (1) 475 475 { 476 476 int i, ok = 1; … … 1938 1947 1939 1948 initPTS = vFrame.first()->pkt.pts; 1940 1949 1941 LOG(VB_GENERAL, LOG_INFO, QString(" #%1 PTS:%2 Delta: 0.0ms queue: %3")1950 LOG(VB_GENERAL, LOG_INFO, QString("VID #%1 PTS:%2 Delta: 0.0ms queue: %3") 1942 1951 .arg(vid_id).arg(PtsTime(vFrame.first()->pkt.pts)) 1943 1952 .arg(vFrame.count())); 1944 1953 … … 1947 1956 FrameList *af = (*it); 1948 1957 deltaPTS = diff2x33(vFrame.first()->pkt.pts, af->first()->pkt.pts); 1949 1958 LOG(VB_GENERAL, LOG_INFO, 1950 QString(" #%1 PTS:%2 Delta: %3ms queue: %4")1959 QString("AUD #%1 PTS:%2 Delta: %3ms queue: %4") 1951 1960 .arg(it.key()) .arg(PtsTime(af->first()->pkt.pts)) 1952 1961 .arg(1000.0*deltaPTS / 90000.0).arg(af->count())); 1953 1962 … … 2001 2010 displayFrame = 0; 2002 2011 2003 2012 // since we might reorder the frames when coming out of a cutpoint 2004 // me need to save the first frame here, as it is guaranteed to2013 // we need to save the first frame here, as it is guaranteed to 2005 2014 // have a sequence header. 2006 2015 MPEG2frame *seqFrame = vFrame.first(); 2007 2016 … … 2358 2367 AVCodecContext *CC = getCodecContext(it.key()); 2359 2368 bool backwardsPTS = false; 2360 2369 2370 // What to do if the CC is corrupt? 2371 // Just wait and hope it repairs itself 2372 // But if it won't repair itself it ends up in a 'Deadlock detected' error 2373 if (CC->sample_rate == 0 || CC->frame_size == 0) 2374 { 2375 LOG(VB_FRAME, LOG_ERR, QString("CC corrupt in AUD-Frame #%1. sample_rate %2, frame_size %3, channels %4") 2376 .arg(it.key()) 2377 .arg(CC->sample_rate) 2378 .arg(CC->frame_size) 2379 .arg(CC->channels)); 2380 continue; 2381 } 2382 2361 2383 while (af->count()) 2362 2384 { 2363 // What to do if the CC is corrupt?2364 // Just wait and hope it repairs itself2365 if (CC->sample_rate == 0 || CC->frame_size == 0)2366 break;2367 2385 2368 2386 // The order of processing frames is critical to making 2369 2387 // everything work. Backwards PTS discrepancies complicate … … 2542 2572 const struct option long_options[] = 2543 2573 { 2544 2574 {"infile", required_argument, NULL, 'i'}, 2545 2546 2575 {"outfile", required_argument, NULL, 'o'}, 2547 2576 {"format", required_argument, NULL, 'r'}, 2548 2577 {"dbg_lvl", required_argument, NULL, 'd'},