mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
libeplayer3/container_ffmpeg: fix seek bitrate calculation
Origin commit data
------------------
Branch: master
Commit: 40f3aa97eb
Author: martii <m4rtii@gmx.de>
Date: 2014-03-23 (Sun, 23 Mar 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -297,7 +297,7 @@ static void FFMPEGThread(Context_t * context)
|
|||||||
|
|
||||||
if (seek_sec_rel != 0.0) {
|
if (seek_sec_rel != 0.0) {
|
||||||
if (avContext->iformat->flags & AVFMT_TS_DISCONT) {
|
if (avContext->iformat->flags & AVFMT_TS_DISCONT) {
|
||||||
float br = (avContext->bit_rate) ? br = avContext->bit_rate / 8.0 : 180000.0;
|
float br = (avContext->bit_rate) ? avContext->bit_rate / 8.0 : 180000.0;
|
||||||
seek_target_flag = AVSEEK_FLAG_BYTE;
|
seek_target_flag = AVSEEK_FLAG_BYTE;
|
||||||
seek_target = avio_tell(avContext->pb) + seek_sec_rel * br;
|
seek_target = avio_tell(avContext->pb) + seek_sec_rel * br;
|
||||||
} else {
|
} else {
|
||||||
@@ -306,7 +306,7 @@ static void FFMPEGThread(Context_t * context)
|
|||||||
seek_sec_rel = 0.0;
|
seek_sec_rel = 0.0;
|
||||||
} else if (seek_sec_abs >= 0.0) {
|
} else if (seek_sec_abs >= 0.0) {
|
||||||
if (avContext->iformat->flags & AVFMT_TS_DISCONT) {
|
if (avContext->iformat->flags & AVFMT_TS_DISCONT) {
|
||||||
float br = (avContext->bit_rate) ? br = avContext->bit_rate / 8.0 : 180000.0;
|
float br = (avContext->bit_rate) ? avContext->bit_rate / 8.0 : 180000.0;
|
||||||
seek_target_flag = AVSEEK_FLAG_BYTE;
|
seek_target_flag = AVSEEK_FLAG_BYTE;
|
||||||
seek_target = seek_sec_abs * br;
|
seek_target = seek_sec_abs * br;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user