summaryrefslogtreecommitdiff
path: root/rotord/libavwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/libavwrapper.cpp')
-rwxr-xr-xrotord/libavwrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/rotord/libavwrapper.cpp b/rotord/libavwrapper.cpp
index 7f99668..0142e8f 100755
--- a/rotord/libavwrapper.cpp
+++ b/rotord/libavwrapper.cpp
@@ -355,7 +355,8 @@ bool libav::decoder::readNextFrameWithPacket(int targetFrameIndex, AVPacket& pac
finished = 0;
av_free_packet(&packet);
int result;
- if (!avtry(av_read_frame( container, &packet ), "Failed to read frame"))
+ //if (!avtry(av_read_frame( container, &packet ), "Failed to read frame"))
+ if (!avtry(av_read_packet( container, &packet ), "Failed to read packet"))
return false; // !!NOTE: see docs on packet.convergence_duration for proper seeking
if( packet.stream_index != videoStream ) /* Is it what we're trying to parse? */
continue;
@@ -392,8 +393,8 @@ bool libav::decoder::readNextFrameWithPacket(int targetFrameIndex, AVPacket& pac
if (packet.size == 0) // packet.size==0 usually means EOF
break;
}
- //} while ( (!finished) || (pYuv->best_effort_timestamp < targetFrameIndex));
- } while (!finished);
+ } while ( (!finished) || (pYuv->best_effort_timestamp < targetFrameIndex));
+ // } while (!finished);
av_free_packet(&packet);