Merge remote-tracking branch 'martiis-libstb-hal/master'

Origin commit data
------------------
Branch: master
Commit: 71ce14be99
Author: max_10 <max_10@gmx.de>
Date: 2014-05-24 (Sat, 24 May 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
max_10
2014-05-24 14:10:29 +02:00
3 changed files with 19 additions and 6 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
/m4/ /m4/
/autom4te.cache/ /autom4te.cache/
/aclocal.m4 /aclocal.m4
/compile
/config.guess /config.guess
/config.h.in /config.h.in
/config.h.in~ /config.h.in~

View File

@@ -262,10 +262,22 @@ bool Input::Play()
return res; return res;
} }
static std::string lastlog_message;
static unsigned int lastlog_repeats;
static void log_callback(void *ptr __attribute__ ((unused)), int lvl __attribute__ ((unused)), const char *format, va_list ap) static void log_callback(void *ptr __attribute__ ((unused)), int lvl __attribute__ ((unused)), const char *format, va_list ap)
{ {
// if (debug_level > 10) char m[1024];
vfprintf(stderr, format, ap); if (sizeof(m) - 1 > (unsigned int) vsnprintf(m, sizeof(m), format, ap)) {
if (lastlog_message.compare(m) || lastlog_repeats > 999) {
if (lastlog_repeats)
fprintf(stderr, "last message repeated %u times\n", lastlog_repeats);
lastlog_message = m;
lastlog_repeats = 0;
fprintf(stderr, "%s", m);
} else
lastlog_repeats++;
}
} }
bool Input::ReadSubtitle(const char *filename, const char *format, int pid) bool Input::ReadSubtitle(const char *filename, const char *format, int pid)

View File

@@ -311,8 +311,11 @@ bool WriterPCM::Write(AVPacket *packet, int64_t pts)
break; break;
} }
if (packet->data)
packet_size -= len;
if (!got_frame) { if (!got_frame) {
if (!packet->data) if (!packet->data || !packet_size)
break; break;
continue; continue;
} }
@@ -338,9 +341,6 @@ bool WriterPCM::Write(AVPacket *packet, int64_t pts)
} }
pts = 0; pts = 0;
if (packet->data)
packet_size -= len;
} }
return !packet_size; return !packet_size;
} }